Package org.pkl.core.runtime
Class VmDataSize
- java.lang.Object
-
- org.pkl.core.runtime.VmValue
-
- org.pkl.core.runtime.VmDataSize
-
- All Implemented Interfaces:
java.lang.Comparable<VmDataSize>
public final class VmDataSize extends VmValue implements java.lang.Comparable<VmDataSize>
-
-
Constructor Summary
Constructors Constructor Description VmDataSize(double value, DataSizeUnit unit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Taccept(VmValueConverter<T> converter, java.lang.Iterable<java.lang.Object> path)voidaccept(VmValueVisitor visitor)VmDataSizeadd(VmDataSize other)intcompareTo(VmDataSize other)VmDataSizeconvertTo(DataSizeUnit unit)VmDataSizedivide(double num)doubledivide(VmDataSize other)booleanequals(@Nullable java.lang.Object obj)Enables calling `vmValue.equals()` when not behind a Truffle boundary.Valueexport()voidforce(boolean allowUndefinedValues)Forces recursive (deep) evaluation of this value.DataSizeUnitgetUnit()doublegetValue()VmClassgetVmClass()inthashCode()VmDataSizemultiply(double num)VmDataSizepow(double num)VmDataSizeremainder(double num)VmDataSizeround()VmDataSizesubtract(VmDataSize other)java.lang.StringtoString()static @Nullable DataSizeUnittoUnit(Identifier identifier)-
Methods inherited from class org.pkl.core.runtime.VmValue
export, exportNullable, force, getPrototype, isDynamic, isListing, isMapping, isPrototype, isSequence, isTyped
-
-
-
-
Constructor Detail
-
VmDataSize
public VmDataSize(double value, DataSizeUnit unit)
-
-
Method Detail
-
toUnit
public static @Nullable DataSizeUnit toUnit(Identifier identifier)
-
getVmClass
public VmClass getVmClass()
- Specified by:
getVmClassin classVmValue
-
getValue
public double getValue()
-
getUnit
public DataSizeUnit getUnit()
-
add
public VmDataSize add(VmDataSize other)
-
subtract
public VmDataSize subtract(VmDataSize other)
-
multiply
public VmDataSize multiply(double num)
-
divide
public VmDataSize divide(double num)
-
divide
public double divide(VmDataSize other)
-
remainder
public VmDataSize remainder(double num)
-
pow
public VmDataSize pow(double num)
-
round
public VmDataSize round()
-
convertTo
public VmDataSize convertTo(DataSizeUnit unit)
-
force
public void force(boolean allowUndefinedValues)
Description copied from class:VmValueForces recursive (deep) evaluation of this value.
-
accept
public void accept(VmValueVisitor visitor)
-
accept
public <T> T accept(VmValueConverter<T> converter, java.lang.Iterable<java.lang.Object> path)
-
compareTo
public int compareTo(VmDataSize other)
- Specified by:
compareToin interfacejava.lang.Comparable<VmDataSize>
-
equals
public boolean equals(@Nullable java.lang.Object obj)
Description copied from class:VmValueEnables calling `vmValue.equals()` when not behind a Truffle boundary.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-