com.sun.syndication.feed.module.base.types
Class FloatUnit

java.lang.Object
  extended by com.sun.syndication.feed.module.base.types.FloatUnit
All Implemented Interfaces:
CloneableType, java.lang.Cloneable

public class FloatUnit
extends java.lang.Object
implements CloneableType

This class represents a quantity consisting of a float value and an optional units specification.

Version:
$Revision: 1.1 $
Author:
Robert "kebernet" Cooper

Constructor Summary
FloatUnit(float value, java.lang.String units)
          Creates a new instance of FloatUnit
FloatUnit(java.lang.String source)
          Creates a new float unit by parsing a String value
 
Method Summary
 java.lang.Object clone()
          Duplicates the object.
 boolean equals(java.lang.Object o)
           
 java.lang.String getUnits()
          Returns the units.
 float getValue()
          Returns the float value.
 java.lang.String toString()
          Returns a String representation of the object.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FloatUnit

public FloatUnit(java.lang.String source)
Creates a new float unit by parsing a String value

Parameters:
source - String value to parse

FloatUnit

public FloatUnit(float value,
                 java.lang.String units)
Creates a new instance of FloatUnit

Parameters:
value - float value
units - Units represented, or null.
Method Detail

getUnits

public java.lang.String getUnits()
Returns the units.

Returns:
Returns the units.

getValue

public float getValue()
Returns the float value.

Returns:
Returns the float value.

clone

public java.lang.Object clone()
Duplicates the object.

Specified by:
clone in interface CloneableType
Overrides:
clone in class java.lang.Object
Returns:
Duplicate FloatUnit

toString

public java.lang.String toString()
Returns a String representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
Returns a String representation of the object.

equals

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


Copyright © 2006-2009. All Rights Reserved.