Class AttributeInfiniteValue

All Implemented Interfaces:
IConvertable, IPrimitiveValue, ISingleValue, IValue, Serializable, Comparable<Object>

public class AttributeInfiniteValue extends InfiniteValue
Profile value object for an infinite value.

This class is introduced to provide more information (attribute/instance) in case of a ConversionException.

Since:
7.0
Author:
Jon van Leuven
See Also:
  • Constructor Details

    • AttributeInfiniteValue

      protected AttributeInfiniteValue(InfiniteValue delegateValue, ValueReference reference)
      Construct an attribute value based on a value and an attribute reference.
      Parameters:
      delegateValue - The original value.
      reference - The reference to the attribute of an instance that has this value.
  • Method Details

    • 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
      Overrides:
      booleanValue in class Convertable
      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
      Overrides:
      dateValue in class Convertable
      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
      Overrides:
      doubleValue in class Convertable
      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
      Overrides:
      integerValue in class Convertable
      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
      Overrides:
      longValue in class Convertable
      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
      Overrides:
      stringValue in class Convertable
      Returns:
      String object of the internal value.
    • toRangeValue

      public IRangeValue toRangeValue()
      Description copied from interface: IValue
      This method will attempt to convert the value to a range value. The conversion might fail and raise an exception when the value this method is called on is either a list value. The method isRangeValue can be used to determine if this value can safely be converted to a range value. When the value this method is called on already implements the IRangeValue interface, the implementation may return the same value.
      Specified by:
      toRangeValue in interface IValue
      Overrides:
      toRangeValue in class InfiniteValue
      Returns:
      The same value as a range value.
    • toSingleValue

      public ISingleValue toSingleValue()
      Description copied from interface: IValue
      This method will attempt to convert the value to a single value. The conversion might fail and raise an exception when the value this method is called on is either a range or a list value. The method isSingleValue can be used to determine if this value can safely be converted to a single value. When the value this method is called on already implements the ISingleValue interface, the implementation may return the same value.
      Specified by:
      toSingleValue in interface IValue
      Overrides:
      toSingleValue in class InfiniteValue
      Returns:
      The same value as single value.