Class ValueBase
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.variable.ValueBase
- All Implemented Interfaces:
IValue
- Direct Known Subclasses:
ValueObjectTypeEntity.ValueEntity,ValueObjectTypeFluidStack.ValueFluidStack,ValueObjectTypeItemStack.ValueItemStack,ValueOptionalBase,ValueTypeBoolean.ValueBoolean,ValueTypeDouble.ValueDouble,ValueTypeInteger.ValueInteger,ValueTypeList.ValueList,ValueTypeLong.ValueLong,ValueTypeOperator.ValueOperator,ValueTypeString.ValueString
Base implementation of a variable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<V extends IValue>
booleancanCast(IValueType<V> valueType) Safely downcast this value.<V extends IValue>
Vcast(IValueType<V> valueType) Safely downcast this value.getType()protected IValueCastRegistry
-
Constructor Details
-
ValueBase
-
-
Method Details
-
getType
-
getValueCastRegistry
-
cast
public <V extends IValue> V cast(IValueType<V> valueType) throws IValueCastRegistry.ValueCastException Description copied from interface:IValueSafely downcast this value.- Specified by:
castin interfaceIValue- Type Parameters:
V- The actual value type.- Parameters:
valueType- The type of value to cast to.- Returns:
- The downcasted value.
- Throws:
IValueCastRegistry.ValueCastException- If this value could not be cast to the given type.
-
canCast
Description copied from interface:IValueSafely downcast this value.
-