public class BytesValue
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
BytesValue.Unit
Unit enum.
|
Modifier and Type | Field and Description |
---|---|
protected BytesValue.Unit |
unit |
protected long |
value |
Constructor and Description |
---|
BytesValue(long bytes)
Value, from a bytes value.
|
BytesValue(long value,
BytesValue.Unit unit)
Value, from a bytes value.
|
BytesValue(java.lang.String v)
Parse a bytes value.
|
Modifier and Type | Method and Description |
---|---|
int |
intValue()
Get the int value, in bytes.
|
long |
longValue()
Get the long value, in bytes.
|
java.lang.String |
toString()
Return the string representation of the object.
|
static BytesValue |
valueOf(long v)
Returns a BytesValue object representing the specified long value.
|
static BytesValue |
valueOf(java.lang.String s)
Returns a BytesValue object representing the specified String
value.
|
protected BytesValue.Unit unit
protected long value
public BytesValue(java.lang.String v) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public BytesValue(long bytes)
public BytesValue(long value, BytesValue.Unit unit)
public static BytesValue valueOf(java.lang.String s) throws java.lang.NumberFormatException
s
- the string to be parsedjava.lang.NumberFormatException
public java.lang.String toString()
toString
in class java.lang.Object
public long longValue()
public int intValue()
public static BytesValue valueOf(long v)
v
- the valueCopyright © 2013 Dassault Systèmes, All Rights Reserved.