Class ValueTypeLong
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeBase<ValueTypeLong.ValueLong>
org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeLong
- All Implemented Interfaces:
IValueType<ValueTypeLong.ValueLong>,IValueTypeNamed<ValueTypeLong.ValueLong>,IValueTypeNumber<ValueTypeLong.ValueLong>
public class ValueTypeLong
extends ValueTypeBase<ValueTypeLong.ValueLong>
implements IValueTypeNumber<ValueTypeLong.ValueLong>
Value type with values that are doubles.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.cyclops.integrateddynamics.api.evaluate.variable.IValueType
IValueType.ValueTypeComparator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag value) Deserialize the given value.Create an immutable default (zero) value.booleanbooleanbooleanbooleanparseString(String value) Parse the given string representation of a value.net.minecraft.nbt.Tagserialize(ValueTypeLong.ValueLong value) Serialize the given value.net.minecraft.network.chat.MutableComponenttoString(ValueTypeLong.ValueLong value) Get the string representation of the given value.Methods inherited from class org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeBase
canDeserialize, cast, correspondsTo, createLogicProgrammerElement, getDisplayColor, getDisplayColorFormat, getModId, getTranslationKey, getTypeName, getTypeNamespace, getUniqueName, getUnlocalizedPrefix, isCategory, isObject, loadTooltip, materialize, registerModelResourceLocation, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cyclops.integrateddynamics.api.evaluate.variable.IValueType
canDeserialize, cast, correspondsTo, createLogicProgrammerElement, deserializeValuePredicate, getDisplayColor, getDisplayColorFormat, getTranslationKey, getTypeName, getUniqueName, getVariableItemOverrideModel, isCategory, isObject, loadTooltip, materialize, renderISTER
-
Constructor Details
-
ValueTypeLong
public ValueTypeLong()
-
-
Method Details
-
getDefault
Description copied from interface:IValueTypeNumberCreate an immutable default (zero) value.- Specified by:
getDefaultin interfaceIValueType<ValueTypeLong.ValueLong>- Specified by:
getDefaultin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>- Returns:
- The zero value of this number type.
-
toCompactString
- Specified by:
toCompactStringin interfaceIValueType<ValueTypeLong.ValueLong>- Parameters:
value- The value- Returns:
- A short string representation used in guis to show the value.
-
serialize
Description copied from interface:IValueTypeSerialize the given value.- Specified by:
serializein interfaceIValueType<ValueTypeLong.ValueLong>- Parameters:
value- The value to serialize.- Returns:
- The serialized value.
-
deserialize
public ValueTypeLong.ValueLong deserialize(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag value) Description copied from interface:IValueTypeDeserialize the given value.- Specified by:
deserializein interfaceIValueType<ValueTypeLong.ValueLong>- Parameters:
valueDeseralizationContext- Deserialization context.value- The value to deserialize.- Returns:
- The deserialized value.
-
toString
Description copied from interface:IValueTypeGet the string representation of the given value. This is useful for cases when the value needs to be edited in a GUI. This corresponds toIValueType.parseString(String).- Specified by:
toStringin interfaceIValueType<ValueTypeLong.ValueLong>- Overrides:
toStringin classValueTypeBase<ValueTypeLong.ValueLong>- Parameters:
value- A value.- Returns:
- A string representation of the given value.
-
parseString
Description copied from interface:IValueTypeParse the given string representation of a value. This corresponds toIValueType.toString(IValue).- Specified by:
parseStringin interfaceIValueType<ValueTypeLong.ValueLong>- Overrides:
parseStringin classValueTypeBase<ValueTypeLong.ValueLong>- Parameters:
value- A string representation of a value.- Returns:
- A value.
- Throws:
EvaluationException- If parsing failed.
-
isZero
- Specified by:
isZeroin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
isOne
- Specified by:
isOnein interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
add
- Specified by:
addin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
subtract
- Specified by:
subtractin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
multiply
- Specified by:
multiplyin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
divide
- Specified by:
dividein interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
max
- Specified by:
maxin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
min
- Specified by:
minin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
increment
- Specified by:
incrementin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
decrement
- Specified by:
decrementin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
modulus
- Specified by:
modulusin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
greaterThan
- Specified by:
greaterThanin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
lessThan
- Specified by:
lessThanin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
round
- Specified by:
roundin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
ceil
- Specified by:
ceilin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
floor
- Specified by:
floorin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
compact
- Specified by:
compactin interfaceIValueTypeNumber<ValueTypeLong.ValueLong>
-
getName
- Specified by:
getNamein interfaceIValueTypeNamed<ValueTypeLong.ValueLong>
-