Interface IConvertable

All Known Subinterfaces:
ICompoundValue, IDomain, IDomainDefinition, IListValue, IPrimitiveValue, IRangeValue, ISingleValue, IValue
All Known Implementing Classes:
AbstractValue, AnyValue, AttributeBooleanValue, AttributeCurrency, AttributeDateTimeValue, AttributeDateValue, AttributeEntityValue, AttributeInfiniteValue, AttributeIntegerValue, AttributeListValue, AttributeNumberValue, AttributePercentage, AttributeRangeValue, AttributeStringValue, BinaryValue, BooleanValue, Convertable, Currency, DateTimeValue, DateValue, Domain, DomainDefinition, DomainValues, EntityContextDelegate, EntityValue, ForeachObject, InfiniteValue, InstanceReferrer, IntegerValue, ListValue, NumberValue, Percentage, RangeValue, StringValue, ValueReference

public interface IConvertable
Interface for objects that can be converted to primitive types.
Since:
5.0
Author:
O. Kerpershoek
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    This method converts the internal value to a boolean primitive.
    This method converts the internal value to a date object.
    double
    This method converts the internal value to a double primitive.
    This method returns the internal object of this instance without any conversion.
    int
    This method converts the internal value to an integer primitive.
    long
    This method converts the internal value to a long primitive.
    This method converts the internal value to a String object.
  • Method Details

    • booleanValue

      boolean booleanValue()
      This method converts the internal value to a boolean primitive.
      Returns:
      Boolean primitive of the internal value.
      Throws:
      ConversionException - A conversion exception is thrown when the internal value cannot be converted to the requested type.
    • longValue

      long longValue()
      This method converts the internal value to a long primitive.
      Returns:
      Long primitive of the internal value.
      Throws:
      ConversionException - A conversion exception is thrown when the internal value cannot be converted to the requested type.
    • stringValue

      String stringValue()
      This method converts the internal value to a String object.
      Returns:
      String object of the internal value.
      Throws:
      ConversionException - A conversion exception is thrown when the internal value cannot be converted to the requested type.
    • dateValue

      Date dateValue()
      This method converts the internal value to a date object.
      Returns:
      Date object of the internal value.
      Throws:
      ConversionException - A conversion exception is thrown when the internal value cannot be converted to the requested type.
    • integerValue

      int integerValue()
      This method converts the internal value to an integer primitive.
      Returns:
      Integer primitive of the internal value.
      Throws:
      ConversionException - A conversion exception is thrown when the internal value cannot be converted to the requested type.
    • doubleValue

      double doubleValue()
      This method converts the internal value to a double primitive.
      Returns:
      Double primitive of the internal value.
      Throws:
      ConversionException - A conversion exception is thrown when the internal value cannot be converted to the requested type.
    • getValue

      Object getValue()
      This method returns the internal object of this instance without any conversion.
      Returns:
      The internal Object of this attribute value.