Class EnumDomain<T>

java.lang.Object
org.openl.domain.EnumDomain<T>
All Implemented Interfaces:
Iterable<T>, IDomain<T>

public class EnumDomain<T> extends Object implements IDomain<T>
Author:
snshor
  • Constructor Details

    • EnumDomain

      public EnumDomain(T[] elements)
  • Method Details

    • contains

      public boolean contains(T obj)
    • getElementType

      public IType getElementType()
      Specified by:
      getElementType in interface IDomain<T>
      Returns:
      type that can be used with this domain
    • getAllObjects

      public T[] getAllObjects()
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>
    • selectObject

      public boolean selectObject(T obj)
      Specified by:
      selectObject in interface IDomain<T>
      Parameters:
      obj -
      Returns:
      true if object belongs to this domain
    • size

      public int size()
    • toString

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object