Package org.spongepowered.api.data
Interface DirectionRelativeDataProvider<V extends Value<E>,E>
- All Superinterfaces:
DataProvider<V,
E>
-
Method Summary
Modifier and TypeMethodDescriptionget
(DataHolder dataHolder) Gets the elemental value from the providedDataHolder
.get
(DataHolder dataHolder, Direction direction) Gets the elemental value from the providedDataHolder
.default boolean
isSupported
(DataHolder dataHolder) Gets whether this value provider is supported by the givenValueContainer
.boolean
isSupported
(DataHolder dataHolder, Direction direction) Gets whether this value provider is supported by the givenValueContainer
.value
(DataHolder dataHolder) Gets a constructedValue
for the providedDataHolder
.value
(DataHolder dataHolder, Direction direction) Gets a constructedValue
for the providedDataHolder
.Methods inherited from interface org.spongepowered.api.data.DataProvider
allowsAsynchronousAccess, isSupported, isSupported, key, offer, offerValue, remove, with, without, withValue
-
Method Details
-
get
Description copied from interface:DataProvider
Gets the elemental value from the providedDataHolder
. This is generally considered the underlying implementation access for anyValueContainer.get(Key)
where theKey
is registered with thisDataProvider
. Nominally, this means the data is provided outside traditional serialized data that is stored with theDataHolder
. It's possible that there may be changing return values for even immutable types, since the provider is providing the data. -
value
Description copied from interface:DataProvider
Gets a constructedValue
for the providedDataHolder
. Much likeDataProvider.get(DataHolder)
, this is generally considered the underlying implementation access for anyValueContainer.get(Key)
where theKey
is registered with thisDataProvider
. Nominally, this means the data is provided outside traditional serialized data that is stored with theDataHolder
. It's possible that there may be changing return values for even immutable types, since the provider is providing the data. -
isSupported
Description copied from interface:DataProvider
Gets whether this value provider is supported by the givenValueContainer
.- Specified by:
isSupported
in interfaceDataProvider<V extends Value<E>,
E> - Parameters:
dataHolder
- The data holder- Returns:
- Whether it's supported
-
get
Gets the elemental value from the providedDataHolder
. This is generally considered the underlying implementation access for anyValueContainer.get(Key)
where theKey
is registered with thisDataProvider
. Nominally, this means the data is provided outside traditional serialized data that is stored with theDataHolder
. It's possible that there may be changing return values for even immutable types, since the provider is providing the data.- Parameters:
dataHolder
- The data holderdirection
- The related relative direction to the data provider- Returns:
- The value, if it's supported and exists
-
value
Gets a constructedValue
for the providedDataHolder
. Much likeget(DataHolder)
, this is generally considered the underlying implementation access for anyValueContainer.get(Key)
where theKey
is registered with thisDataProvider
. Nominally, this means the data is provided outside traditional serialized data that is stored with theDataHolder
. It's possible that there may be changing return values for even immutable types, since the provider is providing the data.- Parameters:
dataHolder
- The data holder to get the constructed value fromdirection
- The related relative direction to the data provider- Returns:
- The value
-
isSupported
Gets whether this value provider is supported by the givenValueContainer
.- Parameters:
dataHolder
- The data holderdirection
- The related relative direction to the data provider- Returns:
- Whether it's supported
-