T
- type of the user/item/featurepublic class IdxIndex<T> extends Object implements Serializable
Constructor and Description |
---|
IdxIndex()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
add(T t)
Adds an element to the structure.
|
boolean |
containsId(T t)
Checks whether the structure contains this element.
|
T |
get(int idx)
Gets the element assigned to the index.
|
int |
get(T t)
Gets the index of the element.
|
Stream<T> |
getIds()
Returns a stream of the elements stored in the structure.
|
int |
size()
Returns the number of stored elements.
|
public int add(T t)
t
- element to be addedpublic int get(T t)
t
- elementpublic T get(int idx)
idx
- indexpublic boolean containsId(T t)
t
- elementpublic int size()
Copyright © 2016. All rights reserved.