public class Scn extends Object implements Comparable<Scn>
| Modifier and Type | Field and Description |
|---|---|
static Scn |
INVALID
Represents an Scn that is considered INVALID, useful as a placeholder.
|
static Scn |
MAX
Represents an Scn that implies the maximum possible value of an SCN, useful as a placeholder.
|
private BigDecimal |
scn |
static Scn |
ZERO
Represents an Scn with a value of
0. |
| Constructor and Description |
|---|
Scn(BigDecimal scn) |
| Modifier and Type | Method and Description |
|---|---|
Scn |
add(Scn value)
Returns a
SCn whose value is (this + value). |
int |
compareTo(Scn o)
Compares this
SCn with the specified Scn. |
boolean |
equals(Object o) |
int |
hashCode() |
long |
longValue()
Get the Scn represented as a
long data type. |
Scn |
subtract(Scn value)
Returns a
Scn whose value is (this - value). |
String |
toString() |
static Scn |
valueOf(int value)
Construct a
Scn from an integer value. |
static Scn |
valueOf(long value)
Construct a
Scn from a long value. |
static Scn |
valueOf(String value)
Construct a
Scn from a string value. |
public static final Scn INVALID
public static final Scn MAX
public static final Scn ZERO
0.private final BigDecimal scn
public Scn(BigDecimal scn)
public static Scn valueOf(int value)
Scn from an integer value.value - integer valuepublic static Scn valueOf(long value)
Scn from a long value.value - long valuepublic static Scn valueOf(String value)
Scn from a string value.value - string valuepublic long longValue()
long data type.public Scn add(Scn value)
SCn whose value is (this + value).value - the value to be added to this Scn.this + valuepublic Scn subtract(Scn value)
Scn whose value is (this - value).value - the value to be subtracted from this Scn.this - valuepublic int compareTo(Scn o)
SCn with the specified Scn.compareTo in interface Comparable<Scn>o - Scn to which this Scn is to be comparedo.Copyright © 2021 JBoss by Red Hat. All rights reserved.