de.dante.extex.interpreter.type.glue
Interface FixedGlueComponent

All Known Subinterfaces:
FixedDimen
All Known Implementing Classes:
Dimen, GlueComponent

public interface FixedGlueComponent

This interface describes the features of a GlueComponent which do not modify the value.

Version:
$Revision: 1.14 $
Author:
Gerd Neugebauer

Method Summary
 GlueComponent 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.
 int 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.
 Tokens toToks(TokenFactory factory)
          Determine the printable representation of the object and return it as a list of Tokens.
 void toToks(Tokens toks, TokenFactory factory, char c1, char c2)
          Determine the printable representation of the object and return it as a list of Tokens.
 

Method Detail

copy

public GlueComponent copy()
Create a copy of this instance with the same order and value.

Returns:
a new copy of this instance

eq

public boolean eq(FixedGlueComponent d)
Compares the current instance with another GlueComponent for equality.

Parameters:
d - the other GlueComponent to compare to. If this parameter is null then the comparison fails.
Returns:
true iff |this| == |d| and ord(this) == ord(d)

ge

public boolean ge(FixedGlueComponent d)
Compares the current instance with another GlueComponent.

Parameters:
d - the other GlueComponent to compare to
Returns:
true iff this is greater or equal to d

getOrder

public int getOrder()
Getter for order.

Returns:
the order.

getValue

public long getValue()
Getter for the value in scaled points (sp).

Returns:
the value in internal units of scaled points (sp)

gt

public boolean gt(FixedGlueComponent d)
Compares the current instance with another GlueComponent.

Parameters:
d - the other GlueComponent to compare to
Returns:
true iff ord(this) == ord(d) && |this| > |d| or ord(this) > ord(d)

le

public boolean le(FixedGlueComponent d)
Compares the current instance with another GlueComponent.

Parameters:
d - the other GlueComponent to compare to
Returns:
true iff this is less or equal to d

lt

public boolean lt(FixedGlueComponent d)
Compares the current instance with another GlueComponent.

Parameters:
d - the other GlueComponent to compare to
Returns:
true iff ord(this) == ord(d) && |this| < |d| or ord(this) < ord(d)

ne

public boolean ne(FixedGlueComponent d)
Compares the current instance with another GlueComponent for equality.

Parameters:
d - the other GlueComponent to compare to. If this parameter is null then the comparison fails.
Returns:
false iff |this| == |d| and ord(this) == ord(d)

toString

public java.lang.String toString()
Determine the printable representation of the object.

Returns:
the printable representation
See Also:
toString(StringBuffer), toToks(TokenFactory)

toString

public void toString(java.lang.StringBuffer sb)
Determine the printable representation of the object and append it to the given StringBuffer.

Parameters:
sb - the output string buffer
See Also:
toString()

toToks

public Tokens toToks(TokenFactory factory)
              throws GeneralException
Determine the printable representation of the object and return it as a list of Tokens. The value returned is exactly the string which would be produced by TeX to print the Dimen. This means the result is expressed in pt and properly rounded to be read back in again without loss of information.

Parameters:
factory - the token factory to get the required tokens from
Returns:
the printable representation
Throws:
GeneralException - in case of an error
See Also:
"TeX – The Program [103]", toToks(de.dante.extex.interpreter.type.tokens.Tokens, de.dante.extex.scanner.type.token.TokenFactory, char, char), toString()

toToks

public void toToks(Tokens toks,
                   TokenFactory factory,
                   char c1,
                   char c2)
            throws GeneralException
Determine the printable representation of the object and return it as a list of Tokens. The value returned is exactly the string which would be produced by TeX to print the Dimen. This means the result is expressed in pt and properly rounded to be read back in again without loss of information.

Parameters:
toks - the tokens to append to
factory - the token factory to get the required tokens from
c1 - the first character for the order 0 value
c2 - the second character for the order 0 value
Throws:
GeneralException - in case of an error
See Also:
"TeX – The Program [103]", toToks(TokenFactory), toString(), toString(StringBuffer)