Package org.spongepowered.api.data
Interface DirectionRelativeDataHolder
- All Superinterfaces:
DataHolder,ValueContainer
- All Known Subinterfaces:
BlockState,DirectionRelativeDataHolder.Immutable<I>,DirectionRelativeDataHolder.Mutable,ServerLocation
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescription<E> Optional<E> default OptionalDoubledefault OptionalIntdefault OptionalLong
-
Method Details
-
get
Attempts to get the underlying value backed by aValuelinked to the providedKeyandDirection. If theKeyis not supported,Optional.empty()is returned. It is important to check for support of aKeyby either callingValueContainer.supports(Value)orValueContainer.supports(Key).- Type Parameters:
E- The type of value- Parameters:
direction- The directionkey- The key to retrieve the value for- Returns:
- The value, if available
-
getInt
Attempts to get the underlying int value backed by aValuelinked to the providedKeyandDirection. If theKeyis not supported,Optional.empty()is returned. It is important to check for support of aKeyby either callingValueContainer.supports(Value)orValueContainer.supports(Key).- Parameters:
direction- The directionkey- The key to retrieve the value for- Returns:
- The value, if available
-
getDouble
Attempts to get the underlying double value backed by aValuelinked to the providedKeyandDirection. If theKeyis not supported,Optional.empty()is returned. It is important to check for support of aKeyby either callingValueContainer.supports(Value)orValueContainer.supports(Key).- Parameters:
direction- The directionkey- The key to retrieve the value for- Returns:
- The value, if available
-
getLong
Attempts to get the underlying long value backed by aValuelinked to the providedKeyandDirection. If theKeyis not supported,Optional.empty()is returned. It is important to check for support of aKeyby either callingValueContainer.supports(Value)orValueContainer.supports(Key).- Parameters:
direction- The directionkey- The key to retrieve the value for- Returns:
- The value, if available
-