Record Class Scopes

java.lang.Object
java.lang.Record
org.clafer.frontend.Scopes
Record Components:
clafers - the scope of every clafer, by UID, sorted, the enumerations and their literals included
intLow - the smallest integer, --minint or -128
intHigh - the largest integer, --maxint or 127
stringLength - the length of the longest string literal, with its quotes, at least 16
decimalDigits - the number of fractional digits of decimals, 0 if the model has none and no --decimal-digits

public record Scopes(Map<String,Long> clafers, long intLow, long intHigh, int stringLength, long decimalDigits) extends Record
The scopes that chocosolver solves an explicit model with, as the compiler writes them to the explicit model's scope file (clafer -m clafer --meta-data, model.des.cfr-scope).
  • Constructor Details

    • Scopes

      public Scopes(Map<String,Long> clafers, long intLow, long intHigh, int stringLength, long decimalDigits)
      Creates an instance of a Scopes record class.
      Parameters:
      clafers - the value for the clafers record component
      intLow - the value for the intLow record component
      intHigh - the value for the intHigh record component
      stringLength - the value for the stringLength record component
      decimalDigits - the value for the decimalDigits record component
  • Method Details

    • scopeFile

      public String scopeFile()
      Returns:
      the scope file, as the compiler writes it (Explicit.explicitScopes)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • clafers

      public Map<String,Long> clafers()
      Returns the value of the clafers record component.
      Returns:
      the value of the clafers record component
    • intLow

      public long intLow()
      Returns the value of the intLow record component.
      Returns:
      the value of the intLow record component
    • intHigh

      public long intHigh()
      Returns the value of the intHigh record component.
      Returns:
      the value of the intHigh record component
    • stringLength

      public int stringLength()
      Returns the value of the stringLength record component.
      Returns:
      the value of the stringLength record component
    • decimalDigits

      public long decimalDigits()
      Returns the value of the decimalDigits record component.
      Returns:
      the value of the decimalDigits record component