sub_arctic.constraints
Interface constraint

All Known Implementing Classes:
std_constraint

public abstract interface constraint

Interface for objects that represent constraints. A constraint consists of an encoding (an integer) and a reference to constraint_impl object that nows how to interpret that encoding (or provides the full contents of the constraint itself). Finally, it also provides a few methods for querying the properties of the constraint.


Method Summary
 int encoding()
          Encoding of constraint as an integer.
 constraint_impl impl()
          The implementation object for this constraint.
 boolean is_external()
          Indicate if this constraint is encoding for an external constraint.
 boolean is_none()
          Indicate if this constraint is actually encoding for no constraint.
 int orientation()
          Orientation of the constraint.
 java.lang.String tag()
          Convert to a terse human readable string
 java.lang.String toString()
          Convert to a human readable string
 

Method Detail

encoding

public int encoding()
Encoding of constraint as an integer.

Returns:
int the encoding value for the constraint
See Also:
constraints.std_encoding_consts

impl

public constraint_impl impl()
The implementation object for this constraint.
Returns:
constraint_impl the implementation object for this constraint.
See Also:
constraints.std_constraint_impl

orientation

public int orientation()
Orientation of the constraint. This is a bitset made up of any of: std_encoding_consts.HORIZONTAL, std_encoding_consts.VERTICAL, and/or std_encoding_consts.NOT_ORIENTED.
Returns:
int the bitset for the orientation(s) of this constraint
See Also:
constraints.std_encoding_consts

is_none

public boolean is_none()
Indicate if this constraint is actually encoding for no constraint.
Returns:
boolean true if this constraint represents no constraint.

is_external

public boolean is_external()
Indicate if this constraint is encoding for an external constraint.
Returns:
boolean true if this constraint is an external (AKA heavyweight) constraint

toString

public java.lang.String toString()
Convert to a human readable string
Overrides:
toString in class java.lang.Object

tag

public java.lang.String tag()
Convert to a terse human readable string