|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.core.count.CountConstant
org.extex.core.count.Count
public class Count
This class represents a long integer value. It is used for instance as count register.
| Field Summary | |
|---|---|
static FixedCount |
ONE
The constant ONE contains the count register with the value 1. |
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
static FixedCount |
THOUSAND
The constant THOUSAND contains the count register with the value 1000. |
static FixedCount |
ZERO
The constant ZERO contains the count register with the value 0. |
| Fields inherited from class org.extex.core.count.CountConstant |
|---|
value |
| Constructor Summary | |
|---|---|
Count()
Creates a new object. |
|
Count(FixedCount count)
Creates a new object. |
|
Count(long value)
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
add(FixedCount val)
Add a Count to the value. |
void |
add(long val)
Add a long to the value. |
void |
divide(FixedCount denom)
Divide the value by a denominator. |
void |
divide(long denom)
Divide the value by a long. |
boolean |
eq(FixedCount count)
Compare the value for equality. |
boolean |
ge(FixedCount count)
Compare the value for a greater or equal value. |
long |
getValue()
Getter for the value |
boolean |
gt(FixedCount count)
Compare the value for a greater value. |
boolean |
le(FixedCount count)
Compare the value for a less or equal value. |
boolean |
lt(FixedCount count)
Compare the value for a lesser value. |
void |
multiply(FixedCount factor)
Multiply the value with a factor. |
void |
multiply(long factor)
Multiply the value with a factor. |
boolean |
ne(FixedCount count)
Compare the value for non-equality. |
void |
set(FixedCount c)
Setter for the value. |
void |
set(long l)
Setter for the value. |
java.lang.String |
toString()
Determine the printable representation of the object. |
void |
toString(java.lang.StringBuffer sb)
Determine the printable representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final FixedCount ONE
protected static final long serialVersionUID
public static final FixedCount THOUSAND
public static final FixedCount ZERO
| Constructor Detail |
|---|
public Count(FixedCount count)
count - the reference to be copiedpublic Count(long value)
value - the valuepublic Count()
| Method Detail |
|---|
public void add(long val)
val - the value to add topublic void add(FixedCount val)
val - the value to add to
public void divide(long denom)
throws java.lang.ArithmeticException
denom - the denominator to divide by
java.lang.ArithmeticException - in case of a division by zero
public void divide(FixedCount denom)
throws java.lang.ArithmeticException
denom - the denominator to divide by
java.lang.ArithmeticException - in case of a division by zeropublic boolean eq(FixedCount count)
eq in interface FixedCounteq in class CountConstantcount - the count to compare to
true iff count has an equal value to the current
oneFixedCount.eq(
org.extex.core.count.FixedCount)public boolean ge(FixedCount count)
ge in interface FixedCountge in class CountConstantcount - the count to compare to
true iff count has an value greater or equal to the
current oneFixedCount.ge(
org.extex.core.count.FixedCount)public long getValue()
getValue in interface FixedCountgetValue in class CountConstantpublic boolean gt(FixedCount count)
gt in interface FixedCountgt in class CountConstantcount - the count to compare to
true iff count has an value greater than the
current oneFixedCount.gt(
org.extex.core.count.FixedCount)public boolean le(FixedCount count)
le in interface FixedCountle in class CountConstantcount - the count to compare to
true iff count has an value less or equal to the
current oneFixedCount.le(
org.extex.core.count.FixedCount)public boolean lt(FixedCount count)
lt in interface FixedCountlt in class CountConstantcount - the count to compare to
true iff count has an value less than the
current oneFixedCount.lt(
org.extex.core.count.FixedCount)public void multiply(long factor)
factor - the factor to multiply withpublic void multiply(FixedCount factor)
factor - the factor to multiply withpublic boolean ne(FixedCount count)
ne in interface FixedCountne in class CountConstantcount - the count to compare to
true iff count has an value not equal to the
current oneFixedCount.ne(
org.extex.core.count.FixedCount)public void set(long l)
l - the new valueset(FixedCount)public void set(FixedCount c)
c - the new valueset(long)public java.lang.String toString()
toString in interface FixedCounttoString in class CountConstanttoString(StringBuffer),
CountConstant.toString()public void toString(java.lang.StringBuffer sb)
toString in interface FixedCounttoString in class CountConstantsb - the target string buffertoString(),
CountConstant.toString(java.lang.StringBuffer)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||