Interface IListValue

All Superinterfaces:
IConvertable, IValue, Serializable
All Known Subinterfaces:
IDomain, IDomainDefinition
All Known Implementing Classes:
AttributeListValue, Domain, DomainDefinition, DomainValues, ListValue

public interface IListValue extends IValue
The list value interface defines the methods a value object should implement when it contains multiple values. There are a few restrictions an implementing class should take into consideration:
  • Lists should always ordered (using the compareTo of IPrimitiveValue)
  • Lists may not contain duplicate values (when isUniqueSet() returns true)
  • Lists may not contain overlapping ranges
  • All Values in a list need to be of the same type
Since:
5.0
Author:
O. Kerpershoek
  • Method Details

    • isEmpty

      boolean isEmpty()
      This method will return a boolean indicating if the list contains no values.
      Returns:
      boolean indicating if the list contains no values.
    • isUniqueSet

      boolean isUniqueSet()
      This method will return a boolean indicating if the list enforces all values to be unique. When a list is set to be unique, all duplicate values will be ignored, and each value will appear only once in the list.
      Returns:
      boolean indicating if all values in the list must be unique.
    • getValueCount

      int getValueCount()
      This method will return the number of values that are present in the list. When the list value is UNKNOWN 0 will be returned.
      Returns:
      The number of values in the list.
    • getValueAt

      IPrimitiveValue getValueAt(int index)
      This method will return the value at the specified index. The index passed to this method is zero based, so the first element can be retrieved by invoking this method with 'index = 0', and the last element with 'index = getValueCount() - '.
      Parameters:
      index - Integer containing the index of the value that is requested.
      Returns:
      The value at the specified index.
    • getValues

      IPrimitiveValue[] getValues()
      This method will return an array containing all the values from the list. When the list does not contain any values, an empty array will be returned.
      Returns:
      Array containing all the values from the list.
    • getSortedValues

      IPrimitiveValue[] getSortedValues()
      This method will return the values from the list sorted using the compare method of the values. When the list does not contain any values, an empty list will be returned.
      Returns:
      Array containing the sorted values from the list.