Interface OrdinalSetMapping<T>
- All Superinterfaces:
Iterable<T>
- All Known Subinterfaces:
TabulationDomain<F,
T>
- All Known Implementing Classes:
IFDSTaintDomain
,MutableMapping
,ObjectArrayMapping
,OffsetOrdinalSetMapping
,UnorderedDomain
An object that implements a bijection between whole numbers and objects.
-
Method Summary
Modifier and TypeMethodDescriptionint
Add an Object to the set of mapped objects.int
getMappedObject
(int n) int
int
getSize()
boolean
hasMappedIndex
(T o) stream()
Stream over mapped objects.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getMappedObject
- Returns:
- the object numbered n.
- Throws:
NoSuchElementException
-
getMappedIndex
- Returns:
- the number of a given object, or -1 if the object is not currently in the range.
-
hasMappedIndex
- 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
Add an Object to the set of mapped objects.- Returns:
- the integer to which the object is mapped.
-
stream
-