Package org.ojalgo.structure
Class Structure1D.BasicMapper<T>
- java.lang.Object
-
- org.ojalgo.structure.Structure1D.BasicMapper<T>
-
- All Implemented Interfaces:
Structure1D.IndexMapper<T>
- Enclosing interface:
- Structure1D
public static class Structure1D.BasicMapper<T> extends java.lang.Object implements Structure1D.IndexMapper<T>
-
-
Constructor Summary
Constructors Constructor Description BasicMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) long
indexForNewKey(T newKey)
long
toIndex(T key)
For each key (any instance of that type) there is a corresponding index value – 1 or more key instances will be mapped to each index value.T
toKey(long index)
In most cases it should be safe to assume that the input index value is valid (matching what would be created byStructure1D.IndexMapper.toIndex(Object)
).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ojalgo.structure.Structure1D.IndexMapper
next, previous
-
-
-
-
Field Detail
-
myKeys
private final java.util.List<T> myKeys
-
-
Method Detail
-
toIndex
public long toIndex(T key)
Description copied from interface:Structure1D.IndexMapper
For each key (any instance of that type) there is a corresponding index value – 1 or more key instances will be mapped to each index value.- Specified by:
toIndex
in interfaceStructure1D.IndexMapper<T>
-
toKey
public final T toKey(long index)
Description copied from interface:Structure1D.IndexMapper
In most cases it should be safe to assume that the input index value is valid (matching what would be created byStructure1D.IndexMapper.toIndex(Object)
).- Specified by:
toKey
in interfaceStructure1D.IndexMapper<T>
-
indexForNewKey
final long indexForNewKey(T newKey)
-
-