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 booleanisSupported(DataHolder dataHolder) Gets whether this value provider is supported by the givenValueContainer.booleanisSupported(DataHolder dataHolder, Direction direction) Gets whether this value provider is supported by the givenValueContainer.value(DataHolder dataHolder) Gets a constructedValuefor the providedDataHolder.value(DataHolder dataHolder, Direction direction) Gets a constructedValuefor 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:DataProviderGets the elemental value from the providedDataHolder. This is generally considered the underlying implementation access for anyValueContainer.get(Key)where theKeyis 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:DataProviderGets a constructedValuefor the providedDataHolder. Much likeDataProvider.get(DataHolder), this is generally considered the underlying implementation access for anyValueContainer.get(Key)where theKeyis 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:DataProviderGets whether this value provider is supported by the givenValueContainer.- Specified by:
isSupportedin 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 theKeyis 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 constructedValuefor the providedDataHolder. Much likeget(DataHolder), this is generally considered the underlying implementation access for anyValueContainer.get(Key)where theKeyis 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
-