org.extex.core.muskip
Class Mudimen

java.lang.Object
  extended by org.extex.core.muskip.Mudimen
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Muskip

public class Mudimen
extends java.lang.Object
implements java.io.Serializable

This class provides a dimen value with a length which is a multiple of math units (mu).

Version:
$Revision:4399 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

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.
 Dimen getLength()
          Getter for length.
 boolean isZero()
          Check for a zero value.
 void multiply(long nom, long denom)
          Multiply the value by an integer fraction.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail

Mudimen

public Mudimen()
Creates a new object. All components are 0.


Mudimen

public Mudimen(long len)
Creates a new object.

Parameters:
len - the length
Method Detail

add

public void add(long value)
Add some other length to the current value.

Parameters:
value - the value to add

getLength

public Dimen getLength()
Getter for length.

Returns:
the length

isZero

public boolean isZero()
Check for a zero value.

Returns:
true iff the length is zero

multiply

public void multiply(long nom,
                     long denom)
Multiply the value by an integer fraction.

length = length * nom / denom

Parameters:
nom - nominator
denom - denominator

toString

public java.lang.String toString()
Return the string representation of the instance.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this glue
See Also:
"TeX – The Program [???]"

toString

public void toString(java.lang.StringBuffer sb)
Append the string representation of the instance to a string buffer.

Parameters:
sb - the target string buffer