java.lang.Object
com.aquima.interactions.expressions.definition.Domain
All Implemented Interfaces:
Serializable

public class Domain extends Object implements Serializable
This class represents the domain of a typed expression. As an expression may yield a multi-value result, the domain may consist of a collection of value lists.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a derived empty domain for the specified type.
  • Method Summary

    Modifier and Type
    Method
    Description
    add(IValue domainValue)
    This method may be used to add a value to the domain.
    addAll(IValue... values)
    This method may be used to add an array of values to the domain.
    This method returns the type of the domain.
    getValueAt(int index)
    This method returns the value from the specified index.
    int
    This method returns an integer with the number of values that are present in the domain.
    This method returns an array with all the values from the domain.
    boolean
    This method returns a boolean indicating if the domain is empty.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Domain

      public Domain(DataType type)
      Constructs a derived empty domain for the specified type.
      Parameters:
      type - The type of the domain.
  • Method Details

    • getDataType

      public DataType getDataType()
      This method returns the type of the domain.
      Returns:
      the type of the domain.
    • add

      public Domain add(IValue domainValue)
      This method may be used to add a value to the domain.
      Parameters:
      domainValue - The value that should be added.
      Returns:
      Reference to the domain to allow method chaining.
    • addAll

      public Domain addAll(IValue... values)
      This method may be used to add an array of values to the domain.
      Parameters:
      values - Array of values that should be added.
      Returns:
      Reference to the domain to allow method chaining.
    • getValues

      public IValue[] getValues()
      This method returns an array with all the values from the domain.
      Returns:
      an array with all the values from the domain.
    • getValueAt

      public IValue getValueAt(int index)
      This method returns the value from the specified index.
      Parameters:
      index - The index of the requested value.
      Returns:
      The value from the specified index.
    • getValueCount

      public int getValueCount()
      This method returns an integer with the number of values that are present in the domain.
      Returns:
      an integer with the number of values that are present in the domain.
    • isEmpty

      public boolean isEmpty()
      This method returns a boolean indicating if the domain is empty.
      Returns:
      a boolean indicating if the domain is empty.