public static interface Key.Builder<E,V extends BaseValue<E>> extends CatalogBuilder<Key<V>,Key.Builder<E,V>>
| Modifier and Type | Method and Description |
|---|---|
Key<V> |
build()
Builds a new
Key, provided that the
type(TypeToken), id(String),
name(String), and query(DataQuery)
are set. |
default Key.Builder<E,V> |
from(Key<V> value)
Deprecated.
|
Key.Builder<E,V> |
id(String id)
Sets the id of the
CatalogType (without the namespace/plugin id). |
Key.Builder<E,V> |
name(String name)
Sets the name of the
CatalogType. |
Key.Builder<E,V> |
query(DataQuery query)
Sets the
DataQuery recommended for use with
DataContainers. |
<T,B extends BaseValue<T>> |
type(TypeToken<B> token)
Starter method for the builder, to be used immediately after
Key.builder() is called. |
namereset<T,B extends BaseValue<T>> Key.Builder<T,B> type(TypeToken<B> token)
Key.builder() is called. This defines the generics for the
builder itself to provide the properly generified Key.
Common TypeTokens can be found in
TypeTokens. If a new TypeToken is to be created, it is
recommended to create an anonymous class instance of a token,
as recommended by Guava's wiki found
here.
T - The element type of the KeyB - The base value type of the keytoken - The type token, preferably an anonymousKey.Builder<E,V> id(String id)
CatalogBuilderCatalogType (without the namespace/plugin id).Key.Builder<E,V> name(String name)
CatalogBuilderCatalogType. Defaults to CatalogBuilder.id(String).Key.Builder<E,V> query(DataQuery query)
query - The DataQueryKey<V> build()
Key, provided that the
type(TypeToken), id(String),
name(String), and query(DataQuery)
are set.@Deprecated default Key.Builder<E,V> from(Key<V> value) throws UnsupportedOperationException
ResettableBuilderfrom in interface CatalogBuilder<Key<V extends BaseValue<E>>,Key.Builder<E,V extends BaseValue<E>>>from in interface ResettableBuilder<Key<V extends BaseValue<E>>,Key.Builder<E,V extends BaseValue<E>>>value - The built objectUnsupportedOperationException