Class Values.IntegerValue

    • Field Summary

      Fields 
      Modifier and Type Field Description
      long v
      The value of the integer.
    • Constructor Summary

      Constructors 
      Constructor Description
      IntegerValue​(long v)
      Builds an IntegerValue object with the specified value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareContains​(long l)
      Returns 0 if the entity contains the specified value, -1 if the values of the entity are strictly smaller than the specified value, and +1 if the values of the entity are strictly greater than the specified value.
      long greatest()
      Returns the greatest value of the entity (the value itself or the upper bound of the interval).
      boolean isSingleton()
      Returns true iff the entity is an integer value or an integer interval containing only one value
      long smallest()
      Returns the smallest value of the entity (the value itself or the lower bound of the interval).
      String toString()  
      long width()
      Returns the number of values represented by the entity, or -1 if this number does not fit within a long.
    • Field Detail

      • v

        public final long v
        The value of the integer.
    • Constructor Detail

      • IntegerValue

        public IntegerValue​(long v)
        Builds an IntegerValue object with the specified value.
    • Method Detail

      • isSingleton

        public boolean isSingleton()
        Description copied from interface: Values.IntegerEntity
        Returns true iff the entity is an integer value or an integer interval containing only one value
        Specified by:
        isSingleton in interface Values.IntegerEntity
      • smallest

        public long smallest()
        Description copied from interface: Values.IntegerEntity
        Returns the smallest value of the entity (the value itself or the lower bound of the interval).
        Specified by:
        smallest in interface Values.IntegerEntity
      • greatest

        public long greatest()
        Description copied from interface: Values.IntegerEntity
        Returns the greatest value of the entity (the value itself or the upper bound of the interval).
        Specified by:
        greatest in interface Values.IntegerEntity
      • width

        public long width()
        Description copied from interface: Values.IntegerEntity
        Returns the number of values represented by the entity, or -1 if this number does not fit within a long.
        Specified by:
        width in interface Values.IntegerEntity
      • compareContains

        public int compareContains​(long l)
        Description copied from interface: Values.IntegerEntity
        Returns 0 if the entity contains the specified value, -1 if the values of the entity are strictly smaller than the specified value, and +1 if the values of the entity are strictly greater than the specified value.
        Specified by:
        compareContains in interface Values.IntegerEntity