|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.mine.decisiontree2.learner.ValueMapper<S>
S
- the type to map to an integerpublic class ValueMapper<S>
A mapper mapping the objects of the defined class S
to integer
indices and vice versa.
Constructor Summary | |
---|---|
ValueMapper()
Constructs an empty mapper. |
Method Summary | |
---|---|
int |
getIndex(S mappedObject)
Returns the integer index for the corresponding mapped object. |
int |
getIndexMayBeAdded(S mappedObject)
Returns the integer index for the corresponding mapped object. |
S |
getMappedObject(int index)
Returns the mapped object for the corresponding index. |
S[] |
getMappedObjectsInMappingOrder()
Returns all mapped objects in the order they were inserted. |
int |
getNumMappings()
Returns the number of mappings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValueMapper()
Method Detail |
---|
public S getMappedObject(int index)
index
- the index for which to return the corresponding mapped
object
null
if there exists no mapping for the given indexpublic S[] getMappedObjectsInMappingOrder()
public int getIndex(S mappedObject)
mappedObject
- the mapped object for which to return the
corresponding integer index
-1
if there exists no mapping for the given mapped
objectpublic int getIndexMayBeAdded(S mappedObject)
mappedObject
- the mapped object for which to return the
corresponding integer index
public int getNumMappings()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |