org.zkoss.zuss.util
Class Size

java.lang.Object
  extended by org.zkoss.zuss.util.Size
All Implemented Interfaces:
java.lang.Comparable<java.lang.Object>

public class Size
extends java.lang.Object
implements java.lang.Comparable<java.lang.Object>

Represents a font size.

Author:
tomyeh

Field Summary
 java.lang.String measure
           
 double size
           
 
Constructor Summary
Size(double size, java.lang.String measure)
           
Size(java.lang.String s)
           
 
Method Summary
 Size add(java.lang.Object o)
          Returns a size that adds this size and the given object.
 int compareTo(java.lang.Object o)
          Compares with another object
 Size divide(java.lang.Object o)
          Returns a size that divides this size with the given object.
 boolean equals(java.lang.Object o)
           
 double getValue()
          Returns an integer representing this size.
 int hashCode()
           
 Size multiply(java.lang.Object o)
          Returns a size that multiplies this size with the given object.
 Size negate()
          Return a size that negates this size.
 Size subtract(java.lang.Object o)
          Returns a size that subtracts this size and the given object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

size

public final double size

measure

public final java.lang.String measure
Constructor Detail

Size

public Size(java.lang.String s)

Size

public Size(double size,
            java.lang.String measure)
Method Detail

getValue

public double getValue()
Returns an integer representing this size.


negate

public Size negate()
Return a size that negates this size.


add

public Size add(java.lang.Object o)
Returns a size that adds this size and the given object.


subtract

public Size subtract(java.lang.Object o)
Returns a size that subtracts this size and the given object.


multiply

public Size multiply(java.lang.Object o)
Returns a size that multiplies this size with the given object.


divide

public Size divide(java.lang.Object o)
Returns a size that divides this size with the given object.


compareTo

public int compareTo(java.lang.Object o)
Compares with another object

Specified by:
compareTo in interface java.lang.Comparable<java.lang.Object>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object


Copyright © 2005-2010 Potix Corporation. All Rights Reserved.