Interface DataStore.Builder.SerializersStep
-
- All Superinterfaces:
DataStore.Builder.HolderStep
,ResettableBuilder<DataStore,DataStore.Builder>
- All Known Subinterfaces:
DataStore.Builder.EndStep
- Enclosing interface:
- DataStore.Builder
public static interface DataStore.Builder.SerializersStep extends DataStore.Builder.HolderStep, ResettableBuilder<DataStore,DataStore.Builder>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T,V extends Value<T>>
DataStore.Builder.EndStepkey(Key<V> key, String... dataQueries)
Adds the default implemented serializers for the given key.<T,V extends Value<T>>
DataStore.Builder.EndStepkey(Key<V> key, BiConsumer<DataView,T> serializer, Function<DataView,Optional<T>> deserializer)
Adds the serializers for the given key.<T,V extends Value<T>>
DataStore.Builder.EndStepkey(Key<V> key, DataQuery dataQuery)
Adds the default implemented serializers for the given key.DataStore.Builder.EndStep
keys(Key<?> key, Key<?>... moreKeys)
Adds one or more keys using the default implemented serializers for the given key.-
Methods inherited from interface org.spongepowered.api.data.persistence.DataStore.Builder.HolderStep
holder, holder
-
Methods inherited from interface org.spongepowered.api.util.ResettableBuilder
reset
-
-
-
-
Method Detail
-
keys
DataStore.Builder.EndStep keys(Key<?> key, Key<?>... moreKeys)
Adds one or more keys using the default implemented serializers for the given key.The
ResourceKeyed.key()
resource-key} value will be used as DataQuery- Parameters:
key
- The data keymoreKeys
- more data keys- Returns:
- this builder for chaining
-
key
default <T,V extends Value<T>> DataStore.Builder.EndStep key(Key<V> key, String... dataQueries)
Adds the default implemented serializers for the given key.- Parameters:
key
- The data keydataQueries
- The dataQuery to serialize this key under- Returns:
- this builder for chaining
-
key
<T,V extends Value<T>> DataStore.Builder.EndStep key(Key<V> key, DataQuery dataQuery)
Adds the default implemented serializers for the given key.- Parameters:
key
- The data keydataQuery
- The dataQuery to serialize this key under- Returns:
- this builder for chaining
-
key
<T,V extends Value<T>> DataStore.Builder.EndStep key(Key<V> key, BiConsumer<DataView,T> serializer, Function<DataView,Optional<T>> deserializer)
Adds the serializers for the given key.- Parameters:
key
- The data keyserializer
- the data serializerdeserializer
- the data serserializer- Returns:
- this builder for chaining
-
-