Class DataValueEnumeration<T>

  • Type Parameters:
    T - kind of element
    All Implemented Interfaces:
    DataRange<T>

    public class DataValueEnumeration<T>
    extends java.lang.Object
    implements DataRange<T>

    Title: Data value enumeration

    Description: Enumeration of _data _values (i.e., an OWL 2 DataOneOf)

    Copyright: Copyright (c) 2009

    Company: Clark & Parsia, LLC.

    Author:
    Mike Smith
    • Constructor Summary

      Constructors 
      Constructor Description
      DataValueEnumeration​(java.util.Collection<? extends T> values)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean contains​(java.lang.Object value)
      Check if a data range contains a particular value
      boolean containsAtLeast​(int n)
      Check that a data range contains a minimum number of elements
      T getValue​(int i)
      Deprecated.
      boolean isEmpty()
      Convenience method equivalent to !
      boolean isEnumerable()
      Query if values in the _data range can be enumerated.
      boolean isFinite()
      Query if there are a finite number of values in the _data range.
      int size()
      Deprecated.
      java.lang.String toString()  
      java.util.Iterator<T> valueIterator()
      Get a (possibly infinite) iterator over values in the _data range.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DataValueEnumeration

        public DataValueEnumeration​(java.util.Collection<? extends T> values)
    • Method Detail

      • contains

        public boolean contains​(java.lang.Object value)
        Description copied from interface: DataRange
        Check if a data range contains a particular value
        Specified by:
        contains in interface DataRange<T>
        Parameters:
        value - the value to check
        Returns:
        true if the _data range contains value, false else
      • containsAtLeast

        public boolean containsAtLeast​(int n)
        Description copied from interface: DataRange
        Check that a data range contains a minimum number of elements
        Specified by:
        containsAtLeast in interface DataRange<T>
        Parameters:
        n - the number of elements
        Returns:
        true if the _data range contains n or more elements, false otherwise
      • getValue

        @Deprecated
        public T getValue​(int i)
        Deprecated.
        Description copied from interface: DataRange
        Return a value from an enumerable _data range. Necessary to support LiteralValueBranch shiftTryNext
        Specified by:
        getValue in interface DataRange<T>
        Parameters:
        i - the _index of the value in the _data range
        Returns:
        the value
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: DataRange
        Convenience method equivalent to !containsAtLeast(0)
        Specified by:
        isEmpty in interface DataRange<T>
        Returns:
        true if the _data range contains no elements, false otherwise
      • isEnumerable

        public boolean isEnumerable()
        Description copied from interface: DataRange
        Query if values in the _data range can be enumerated.
        Specified by:
        isEnumerable in interface DataRange<T>
        Returns:
        true if the _data range is enumerable, false otherwise
      • isFinite

        public boolean isFinite()
        Description copied from interface: DataRange
        Query if there are a finite number of values in the _data range.
        Specified by:
        isFinite in interface DataRange<T>
        Returns:
        true if the _data range is finite, false otherwise
      • size

        @Deprecated
        public int size()
        Deprecated.
        Description copied from interface: DataRange
        Return the size of the _data range. Necessary to support LiteralValueBranch constructor
        Specified by:
        size in interface DataRange<T>
        Returns:
        the size of the _data range
      • valueIterator

        public java.util.Iterator<T> valueIterator()
        Description copied from interface: DataRange
        Get a (possibly infinite) iterator over values in the _data range.
        Specified by:
        valueIterator in interface DataRange<T>
        Returns:
        an Iterator
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object