Constructor and Description |
---|
SetCache() |
Modifier and Type | Method and Description |
---|---|
<D extends DataSet<?>> |
add(int id,
D set)
Adds the given
DataSet to this cache for the given ID. |
<S extends SortedGrouping<?>> |
add(int id,
S set)
Adds the given
SortedGrouping to this cache for the given ID. |
<U extends UnsortedGrouping<?>> |
add(int id,
U set)
Adds the given
UnsortedGrouping to this cache for the given ID. |
<T> DataSet<T> |
getDataSet(int id)
Returns the cached
DataSet for the given ID. |
<T> SortedGrouping<T> |
getSortedGrouping(int id)
Returns the cached
SortedGrouping for the given ID. |
<T> UnsortedGrouping<T> |
getUnsortedGrouping(int id)
Returns the cached
UnsortedGrouping for the given ID. |
boolean |
isDataSet(int id)
Checks whether the cached set for the given ID is a
DataSet . |
boolean |
isSortedGrouping(int id)
Checks whether the cached set for the given ID is a
SortedGrouping . |
boolean |
isUnsortedGrouping(int id)
Checks whether the cached set for the given ID is an
UnsortedGrouping . |
void |
reset()
Resets this SetCache, removing any cached sets.
|
public <D extends DataSet<?>> void add(int id, D set)
DataSet
to this cache for the given ID.D
- DataSet classid
- Set IDset
- DataSet to addpublic <U extends UnsortedGrouping<?>> void add(int id, U set)
UnsortedGrouping
to this cache for the given ID.U
- UnsortedGrouping classid
- Set IDset
- UnsortedGrouping to addpublic <S extends SortedGrouping<?>> void add(int id, S set)
SortedGrouping
to this cache for the given ID.S
- SortedGrouping classid
- Set IDset
- SortedGrouping to addpublic boolean isDataSet(int id)
DataSet
.id
- id of set to checkpublic boolean isUnsortedGrouping(int id)
UnsortedGrouping
.id
- id of set to checkpublic boolean isSortedGrouping(int id)
SortedGrouping
.id
- Set IDpublic <T> DataSet<T> getDataSet(int id)
DataSet
for the given ID.T
- DataSet typeid
- Set IDIllegalStateException
- if the cached set is not a DataSetpublic <T> UnsortedGrouping<T> getUnsortedGrouping(int id)
UnsortedGrouping
for the given ID.T
- UnsortedGrouping typeid
- Set IDIllegalStateException
- if the cached set is not an UnsortedGroupingpublic <T> SortedGrouping<T> getSortedGrouping(int id)
SortedGrouping
for the given ID.T
- SortedGrouping typeid
- Set IDIllegalStateException
- if the cached set is not a SortedGroupingpublic void reset()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.