public final class KeyFactory extends Object
Modifier and Type | Method and Description |
---|---|
static <E> Key<ListValue<E>> |
makeListKey(Class<E> elementClass,
DataQuery query)
|
static <K,V> Key<MapValue<K,V>> |
makeMapKey(Class<K> keyClass,
Class<V> valueclass,
DataQuery query)
|
static <E> Key<SetValue<E>> |
makeSetKey(Class<E> elementClass,
DataQuery query)
|
static <E,V extends BaseValue<E>> |
makeSingleKey(Class<E> elementClass,
Class<V> valueClass,
DataQuery query)
|
public static <E,V extends BaseValue<E>> Key<V> makeSingleKey(Class<E> elementClass, Class<V> valueClass, DataQuery query)
Key
with the provided E
element
class and V
Value
class along with the provided
default DataQuery
to be used with the generated Key
.
Note that Key
s are not registered, but it is recommended
to avoid generating Key
s of potentially conflicting
DataQuery
(s).
E
- The type of elementV
- The type of valueelementClass
- The element classvalueClass
- The value classquery
- The querypublic static <E> Key<ListValue<E>> makeListKey(Class<E> elementClass, DataQuery query)
E
- The type of elementelementClass
- The element classquery
- The query to access the datapublic static <E> Key<SetValue<E>> makeSetKey(Class<E> elementClass, DataQuery query)
E
- The type of elementelementClass
- The element classquery
- The query to access the datapublic static <K,V> Key<MapValue<K,V>> makeMapKey(Class<K> keyClass, Class<V> valueclass, DataQuery query)
Key
based on a MapValue
of the types
K
keys and V
values with the provided
DataQuery
for accessing the Map
in DataView
s.K
- The type of keysV
- The type of valueskeyClass
- The key class of the mapvalueclass
- The value class of the mapquery
- The query