Package io.datarouter.bytes
Enum ByteUnitType
- All Implemented Interfaces:
Serializable,Comparable<ByteUnitType>,java.lang.constant.Constable
public enum ByteUnitType extends Enum<ByteUnitType>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classByteUnitType.ByteUnitSystem -
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description static ByteUnitType[]BIN_SORTED_ASC -
Method Summary
Modifier and Type Method Description static ByteUnitType[]getAscValues(ByteUnitType.ByteUnitSystem byteUnitSystem)io.datarouter.bytes.ByteUnitType.ByteUnitNamegetByteUnitName()longgetNumBytes()static doublegetNumBytes(long numBytes, ByteUnitType toByteUnit)StringgetNumBytesDisplay(long value)static StringgetNumBytesDisplay(long value, ByteUnitType toByteUnit)longtoBytes(long input)inttoBytesInt(long input)static ByteUnitTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ByteUnitType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Field Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getAscValues
-
getNumBytesDisplay
-
getNumBytesDisplay
-
getNumBytes
-
getNumBytes
public long getNumBytes() -
getByteUnitName
public io.datarouter.bytes.ByteUnitType.ByteUnitName getByteUnitName() -
toBytes
public long toBytes(long input) -
toBytesInt
public int toBytesInt(long input)
-