Class IntegerValue

java.lang.Object
com.aquima.interactions.foundation.types.AbstractValue
com.aquima.interactions.foundation.types.IntegerValue
All Implemented Interfaces:
IConvertable, IPrimitiveValue, ISingleValue, IValue, Serializable, Comparable<Object>
Direct Known Subclasses:
AttributeIntegerValue

public class IntegerValue extends AbstractValue
This class contains a single integer value.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Field Details

    • UNKNOWN

      public static final IntegerValue UNKNOWN
      This member defines the UNKNOWN value for the integer type.
  • Constructor Details

    • IntegerValue

      protected IntegerValue()
    • IntegerValue

      public IntegerValue(IntegerValue other)
      Copy constructor.
      Parameters:
      other - value to copy.
    • IntegerValue

      public IntegerValue(long longValue)
    • IntegerValue

      public IntegerValue(IMultilingualText displayValue, long longValue)
      Constructs the IntegerValue with a display text.
      Parameters:
      displayValue - Text object containing the display value that should be used.
      longValue - a long containing the actual value.
    • IntegerValue

      public IntegerValue(String typeName, IMultilingualText displayValue, long longValue)
  • Method Details

    • valueOf

      public static IntegerValue valueOf(Object obj)
    • parseLong

      public static long parseLong(Object obj)
    • forType

      public IPrimitiveValue forType(String typeName, IMultilingualText displayValue)
      Description copied from interface: IPrimitiveValue
      This method adds the type and display information to the value, and returns the value with this added information. The method will not change the state of the value the method is invoked on, but it will return a copy of the current value with the added information.
      Specified by:
      forType in interface IPrimitiveValue
      Specified by:
      forType in class AbstractValue
      Parameters:
      typeName - The type of the value.
      displayValue - Multilingual text containing display values.
      Returns:
      The value with the added information.
    • contains

      public boolean contains(Object objValue)
      Description copied from interface: IValue
      This method returns a boolean indicating if the object passed to this method is entirely part of this value. This method will thus also return true when the object passed is equal to this value, but the method will return false when only part (or none) of the object is represented by this value. Note that for value types that are singular in nature (for instance, implementations of ISingleValue) the operation of this method is limited to an equality check.
      Specified by:
      contains in interface IValue
      Specified by:
      contains in class AbstractValue
      Parameters:
      objValue - Object for which should be checked if it is entirely part of this value.
      Returns:
      boolean indicating if the object passed is entirely part of this value.
    • getDataType

      public DataType getDataType()
      Description copied from interface: IValue
      This method returns the data type of the value.
      Specified by:
      getDataType in interface IValue
      Specified by:
      getDataType in class AbstractValue
      Returns:
      The data type of the value.
    • isUnknown

      public boolean isUnknown()
      Description copied from interface: IValue
      This method returns a boolean indicating if the value is unknown.
      Specified by:
      isUnknown in interface IValue
      Specified by:
      isUnknown in class AbstractValue
      Returns:
      boolean indicating if the value is unknown.
    • compareSimple

      protected int compareSimple(Object obj)
      Specified by:
      compareSimple in class AbstractValue
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractValue
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AbstractValue
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getValue

      public Object getValue()
      Description copied from interface: IConvertable
      This method returns the internal object of this instance without any conversion.
      Specified by:
      getValue in interface IConvertable
      Specified by:
      getValue in class AbstractValue
      Returns:
      The internal Object of this attribute value.
    • booleanValue

      public boolean booleanValue()
      Description copied from interface: IConvertable
      This method converts the internal value to a boolean primitive.
      Specified by:
      booleanValue in interface IConvertable
      Specified by:
      booleanValue in class AbstractValue
      Returns:
      Boolean primitive of the internal value.
    • dateValue

      public Date dateValue()
      Description copied from interface: IConvertable
      This method converts the internal value to a date object.
      Specified by:
      dateValue in interface IConvertable
      Specified by:
      dateValue in class AbstractValue
      Returns:
      Date object of the internal value.
    • doubleValue

      public double doubleValue()
      Description copied from interface: IConvertable
      This method converts the internal value to a double primitive.
      Specified by:
      doubleValue in interface IConvertable
      Specified by:
      doubleValue in class AbstractValue
      Returns:
      Double primitive of the internal value.
    • integerValue

      public int integerValue()
      Description copied from interface: IConvertable
      This method converts the internal value to an integer primitive.
      Specified by:
      integerValue in interface IConvertable
      Specified by:
      integerValue in class AbstractValue
      Returns:
      Integer primitive of the internal value.
    • longValue

      public long longValue()
      Description copied from interface: IConvertable
      This method converts the internal value to a long primitive.
      Specified by:
      longValue in interface IConvertable
      Specified by:
      longValue in class AbstractValue
      Returns:
      Long primitive of the internal value.
    • stringValue

      public String stringValue()
      Description copied from interface: IConvertable
      This method converts the internal value to a String object.
      Specified by:
      stringValue in interface IConvertable
      Specified by:
      stringValue in class AbstractValue
      Returns:
      String object of the internal value.
    • toAbs

      public IntegerValue toAbs()
    • duplicate

      public IValue duplicate()
      Description copied from interface: IValue
      This method returns a deep copy of the value.
      Specified by:
      duplicate in interface IValue
      Specified by:
      duplicate in class AbstractValue
      Returns:
      A deep clone.