|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dante.extex.interpreter.type.muskip.Mudimen
This class provides a dimen value with a length which is a multiple of math units (mu).
Field Summary | |
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
Constructor Summary | |
Mudimen()
Creates a new object. |
|
Mudimen(long len)
Creates a new object. |
Method Summary | |
void |
add(long value)
Add some other length to the current value. |
GlueComponent |
getLength()
Getter for length. |
boolean |
isZero()
Check for a zero value. |
void |
multiply(long nom,
long denom)
Multiply the value by an integer fraction. |
static Mudimen |
parseMudimen(Context context,
TokenSource source,
Typesetter typesetter)
Creates a new object and fills it from a token stream. |
protected static long |
scanMu(Context context,
TokenSource source,
Typesetter typesetter)
Scan a math unit. |
java.lang.String |
toString()
Return the string representation of the instance. |
void |
toString(java.lang.StringBuffer sb)
Append the string representation of the instance to a string buffer. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final long serialVersionUID
Constructor Detail |
public Mudimen()
public Mudimen(long len)
len
- the lengthMethod Detail |
protected static long scanMu(Context context, TokenSource source, Typesetter typesetter) throws InterpreterException
context
- the processor contextsource
- the source for new tokenstypesetter
- the typesetter
InterpreterException
- in case of an errorpublic static Mudimen parseMudimen(Context context, TokenSource source, Typesetter typesetter) throws InterpreterException
〈mudimen〉 → 〈float〉 mu | 〈mudimen variable〉The value of 〈mudimen〉 is either a floating point number followed by the unit mu or a variable value resulting in a mudimen value.
context
- the processor contextsource
- the source for new tokens
InterpreterException
- in case of an errorpublic void add(long value)
value
- the value to addpublic GlueComponent getLength()
public boolean isZero()
true
iff the length is zeropublic void multiply(long nom, long denom)
length = length * nom / denom
nom
- nominatordenom
- denominatorpublic java.lang.String toString()
public void toString(java.lang.StringBuffer sb)
sb
- the target string bufferpublic void toToks(Tokens toks, TokenFactory factory, char c1, char c2) throws CatcodeException
toks
- the tokens to append tofactory
- the token factory to get the required tokens fromc1
- the first character of the unitc2
- the second character of the unit
CatcodeException
- in case of an error
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |