|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.core.glue.GlueComponentConstant
public class GlueComponentConstant
This class provides a means to store floating numbers with an order.
Examples
123 pt -123 pt 123.456 pt 123.pt .465 pt -.456pt +456pt
| Field Summary | |
|---|---|
static long |
ONE
The constant ONE contains the internal representation for 1pt. |
protected byte |
order
The field order contains the order of infinity. |
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
protected long |
value
The field value contains the integer representation of the dimen register in sp if the order is 0. |
| Constructor Summary | |
|---|---|
GlueComponentConstant()
Creates a new object. |
|
GlueComponentConstant(FixedGlueComponent component)
Creates a new object with a fixed width. |
|
GlueComponentConstant(long theValue)
Creates a new object with a fixed width. |
|
GlueComponentConstant(long theValue,
byte theOrder)
Creates a new object with a width with a possibly higher order. |
|
| Method Summary | |
|---|---|
FixedGlueComponent |
copy()
Create a copy of this instance with the same order and value. |
boolean |
eq(FixedGlueComponent d)
Compares the current instance with another GlueComponent for equality. |
boolean |
ge(FixedGlueComponent d)
Compares the current instance with another GlueComponent. |
byte |
getOrder()
Getter for order. |
long |
getValue()
Getter for the value in scaled points (sp). |
boolean |
gt(FixedGlueComponent d)
Compares the current instance with another GlueComponent. |
boolean |
le(FixedGlueComponent d)
Compares the current instance with another GlueComponent. |
boolean |
lt(FixedGlueComponent d)
Compares the current instance with another GlueComponent. |
boolean |
ne(FixedGlueComponent d)
Compares the current instance with another GlueComponent for equality. |
java.lang.String |
toString()
Determine the printable representation of the object. |
void |
toString(java.lang.StringBuffer sb)
Determine the printable representation of the object and append it to the given StringBuffer. |
void |
toString(java.lang.StringBuffer sb,
char c1,
char c2)
Determine the printable representation of the object and append it to the given StringBuffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long ONE
protected static final long serialVersionUID
protected byte order
protected long value
| Constructor Detail |
|---|
public GlueComponentConstant()
public GlueComponentConstant(FixedGlueComponent component)
component - the fixed valuepublic GlueComponentConstant(long theValue)
theValue - the fixed value
public GlueComponentConstant(long theValue,
byte theOrder)
theValue - the fixed width or the factortheOrder - the order| Method Detail |
|---|
public FixedGlueComponent copy()
copy in interface FixedGlueComponentpublic boolean eq(FixedGlueComponent d)
eq in interface FixedGlueComponentd - the other GlueComponent to compare to. If this parameter is
null then the comparison fails.
true iff |this| == |d| and ord(this) == ord(d)public boolean ge(FixedGlueComponent d)
ge in interface FixedGlueComponentd - the other GlueComponent to compare to
true iff this is greater or equal to dpublic byte getOrder()
getOrder in interface FixedGlueComponentFixedGlueComponent.getOrder()public long getValue()
getValue in interface FixedGlueComponentpublic boolean gt(FixedGlueComponent d)
gt in interface FixedGlueComponentd - the other GlueComponent to compare to
true iff ord(this) == ord(d) && |this| > |d|
or ord(this) > ord(d)public boolean le(FixedGlueComponent d)
le in interface FixedGlueComponentd - the other GlueComponent to compare to
true iff this is less or equal to dpublic boolean lt(FixedGlueComponent d)
lt in interface FixedGlueComponentd - the other GlueComponent to compare to
true iff ord(this) == ord(d) && |this| < |d|
or ord(this) < ord(d)public boolean ne(FixedGlueComponent d)
ne in interface FixedGlueComponentd - the other GlueComponent to compare to. If this parameter is
null then the comparison fails.
false iff |this| == |d| and ord(this) == ord(d)public java.lang.String toString()
toString in interface FixedGlueComponenttoString in class java.lang.ObjecttoString(StringBuffer)public void toString(java.lang.StringBuffer sb)
toString in interface FixedGlueComponentsb - the output string buffertoString()
public void toString(java.lang.StringBuffer sb,
char c1,
char c2)
sb - the output string bufferc1 - the first character for the length of order 0c2 - the second character for the length of order 0toString(StringBuffer)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||