java.lang.Object
org.sejda.commons.LookupTable<I>
- Type Parameters:
I- type of the items
Component that allows to set up a lookup relation between items of the same type.
- Author:
- Andrea Vacondio
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LookupTable
public LookupTable()
-
-
Method Details
-
addLookupEntry
Adds a lookup entry.- Parameters:
keyItem-valueItem-
-
clear
public void clear() -
isEmpty
public boolean isEmpty()- Returns:
- true if the table is empty
-
lookup
Looks up the item that correspond to the given one- Parameters:
item-- Returns:
- the item associated to the given input one or null if no mapping is present
-
hasLookupFor
- Parameters:
item-- Returns:
- true if the table contains a lookup for the given item
-
values
- Returns:
- a collection containing values of the table
-
first
- Returns:
- the first item or null if the table is empty.
-
keys
- Returns:
- the keys of the table
-