Interface IValue
- All Known Implementing Classes:
- DummyValueType.DummyValue,- ValueBase,- ValueEntityMock,- ValueObjectTypeBlock.ValueBlock,- ValueObjectTypeEntity.ValueEntity,- ValueObjectTypeFluidStack.ValueFluidStack,- ValueObjectTypeIngredients.ValueIngredients,- ValueObjectTypeItemStack.ValueItemStack,- ValueObjectTypeRecipe.ValueRecipe,- ValueOptionalBase,- ValueTypeBoolean.ValueBoolean,- ValueTypeDouble.ValueDouble,- ValueTypeInteger.ValueInteger,- ValueTypeList.ValueList,- ValueTypeLong.ValueLong,- ValueTypeNbt.ValueNbt,- ValueTypeOperator.ValueOperator,- ValueTypeString.ValueString
public interface IValue
An immutable value.
- 
Method SummaryModifier 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()
- 
Method Details- 
getTypeIValueType getType()- Returns:
- The type of this variable.
 
- 
castSafely downcast this value.- 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.
 
- 
canCastSafely downcast this value.- Type Parameters:
- V- The actual value type.
- Parameters:
- valueType- The type of value to cast to.
- Returns:
- If this value can be casted to the target type.
 
 
-