public class ScopeBuilder extends Object implements Scopable
Scope.builder()
,
Scope.setScope(org.clafer.ast.AstClafer, int)
, Scope.defaultScope(int)
,
Scope.intLow
, or Scope.intHigh
to construct the builder. The
default scope and lowest and highest integers will be given a default if not
set explicitly.Scope
Modifier and Type | Method and Description |
---|---|
ScopeBuilder |
adjustDefaultScope(int adjust)
Adjust the scope of unspecified Clafers.
|
ScopeBuilder |
adjustIntHigh(int adjust)
Adjust the highest integer used for solving.
|
ScopeBuilder |
adjustIntLow(int adjust)
Adjust the lowest integer used for solving.
|
ScopeBuilder |
adjustScope(AstClafer clafer,
int adjust)
Adjust the scope of the Clafer.
|
ScopeBuilder |
defaultScope(int defaultScope)
Set the scope for unspecified Clafers.
|
ScopeBuilder |
intHigh(int intHigh)
Set the highest (inclusive) integer used for solving.
|
ScopeBuilder |
intLow(int intLow)
Set the lowest (inclusive) integer used for solving.
|
ScopeBuilder |
setScope(AstClafer clafer,
int scope)
Set the scope of the Clafer.
|
Scope |
toScope()
Finalizes all the decisions made in the builder.
|
public ScopeBuilder setScope(AstClafer clafer, int scope)
clafer
- the Claferscope
- the scope of the claferpublic ScopeBuilder adjustScope(AstClafer clafer, int adjust)
newScope = oldScope + adjust
. Otherwise
newScope = defaultScope + adjust
.clafer
- the Claferadjust
- increment the scope by this amountpublic ScopeBuilder defaultScope(int defaultScope)
defaultScope
- the default scopepublic ScopeBuilder adjustDefaultScope(int adjust)
adjust
- increment the default scope by this amountpublic ScopeBuilder intLow(int intLow)
intLow
- the lowest integerpublic ScopeBuilder adjustIntLow(int adjust)
adjust
- increment the lowest integer by this amountpublic ScopeBuilder intHigh(int intHigh)
intHigh
- the highest integerpublic ScopeBuilder adjustIntHigh(int adjust)
adjust
- increment the highest integer by this amountCopyright © 2013. All Rights Reserved.