public class MillisecondsValue
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MillisecondsValue.Unit
Unit enum.
|
Modifier and Type | Field and Description |
---|---|
protected MillisecondsValue.Unit |
unit |
protected long |
value |
Constructor and Description |
---|
MillisecondsValue(long milliseconds)
Value, from a milliseconds value.
|
MillisecondsValue(long value,
MillisecondsValue.Unit unit)
Value, from a milliseconds value.
|
MillisecondsValue(java.lang.String v)
Parse a milliseconds value.
|
Modifier and Type | Method and Description |
---|---|
int |
intValue()
Get the int value, in milliseconds.
|
long |
longValue()
Get the long value, in milliseconds.
|
java.lang.String |
toString()
Return the string representation of the object.
|
static MillisecondsValue |
valueOf(long v)
Returns a MillisecondsValue object representing the specified long value.
|
static MillisecondsValue |
valueOf(java.lang.String s)
Returns a MillisecondsValue object representing the specified String
value.
|
protected MillisecondsValue.Unit unit
protected long value
public MillisecondsValue(java.lang.String v) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public MillisecondsValue(long milliseconds)
public MillisecondsValue(long value, MillisecondsValue.Unit unit)
public static MillisecondsValue 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 MillisecondsValue valueOf(long v) throws java.lang.NumberFormatException
v
- the valuejava.lang.NumberFormatException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.