public abstract class LabelToOrdinal extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
counter |
static int |
INVALID_ORDINAL |
Constructor and Description |
---|
LabelToOrdinal() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addLabel(CategoryPath label,
int ordinal)
Adds a new label if its not yet in the table.
|
int |
getMaxOrdinal()
return the maximal Ordinal assigned so far
|
int |
getNextOrdinal()
Returns the next unassigned ordinal.
|
abstract int |
getOrdinal(CategoryPath label) |
protected int counter
public static final int INVALID_ORDINAL
public int getMaxOrdinal()
public int getNextOrdinal()
public abstract void addLabel(CategoryPath label, int ordinal)
IllegalArgumentException
if the same label with
a different ordinal was previoulsy added to this table.public abstract int getOrdinal(CategoryPath label)
INVALID_ORDINAL
if the label cannot be found in this table.Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.