Interface OrdinalSetMapping<T>

All Superinterfaces:
Iterable<T>
All Known Subinterfaces:
TabulationDomain<F,T>
All Known Implementing Classes:
IFDSTaintDomain, MutableMapping, ObjectArrayMapping, OffsetOrdinalSetMapping, UnorderedDomain

public interface OrdinalSetMapping<T> extends Iterable<T>
An object that implements a bijection between whole numbers and objects.
  • Method Details

    • getMappedObject

      T getMappedObject(int n) throws NoSuchElementException
      Returns:
      the object numbered n.
      Throws:
      NoSuchElementException
    • getMappedIndex

      int getMappedIndex(Object o)
      Returns:
      the number of a given object, or -1 if the object is not currently in the range.
    • hasMappedIndex

      boolean hasMappedIndex(T o)
      Returns:
      whether the given object is mapped by this mapping
    • getMaximumIndex

      int getMaximumIndex()
      Returns:
      the maximum integer mapped to an object
    • getSize

      int getSize()
      Returns:
      the current size of the bijection
    • add

      int add(T o)
      Add an Object to the set of mapped objects.
      Returns:
      the integer to which the object is mapped.
    • stream

      Stream<T> stream()
      Stream over mapped objects.
      Returns:
      a stream over the mapped objects