Interface DataRange<T>

    • Method Detail

      • contains

        boolean contains​(java.lang.Object value)
        Check if a data range contains a particular value
        Parameters:
        value - the value to check
        Returns:
        true if the _data range contains value, false else
      • containsAtLeast

        boolean containsAtLeast​(int n)
        Check that a data range contains a minimum number of elements
        Parameters:
        n - the number of elements
        Returns:
        true if the _data range contains n or more elements, false otherwise
      • isEmpty

        boolean isEmpty()
        Convenience method equivalent to !containsAtLeast(0)
        Returns:
        true if the _data range contains no elements, false otherwise
      • isEnumerable

        boolean isEnumerable()
        Query if values in the _data range can be enumerated.
        Returns:
        true if the _data range is enumerable, false otherwise
      • isFinite

        boolean isFinite()
        Query if there are a finite number of values in the _data range.
        Returns:
        true if the _data range is finite, false otherwise
      • size

        @Deprecated
        default int size()
        Deprecated.
        Return the size of the _data range. Necessary to support LiteralValueBranch constructor
        Returns:
        the size of the _data range
        Throws:
        java.lang.IllegalStateException - if isFinite() returns false
      • getValue

        @Deprecated
        default T getValue​(int i)
        Deprecated.
        Return a value from an enumerable _data range. Necessary to support LiteralValueBranch shiftTryNext
        Parameters:
        i - the _index of the value in the _data range
        Returns:
        the value
        Throws:
        java.lang.IllegalStateException - if isEnumerable() returns false
      • valueIterator

        java.util.Iterator<T> valueIterator()
        Get a (possibly infinite) iterator over values in the _data range.
        Returns:
        an Iterator
        Throws:
        java.lang.IllegalStateException - if isEnumerable() returns false