uk.me.nxg.unity
Class UnitRepresentation

java.lang.Object
  extended by uk.me.nxg.unity.UnitRepresentation
All Implemented Interfaces:
Iterator<UnitRepresentation>

public class UnitRepresentation
extends Object
implements Iterator<UnitRepresentation>

A description of the way that a unit is represented in a particular syntax.


Method Summary
 String getAbbreviation()
          Returns a symbolic abbreviation for this unit in this syntax.
 boolean hasNext()
          If there is more than one representation for this unit in this syntax, then this will return the next one.
 boolean isDeprecated()
          Indicates whether this syntax deprecates (but still permits) the use of this unit.
 boolean mayHaveBinaryPrefixes()
          Indicates whether this unit may be used with binary prefixes.
 boolean mayHaveSIPrefixes()
          Indicates whether this unit may be used with SI prefixes.
 UnitRepresentation next()
          Returns true if hasNext() would succeed.
 void remove()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public String toString()
Overrides:
toString in class Object

mayHaveSIPrefixes

public boolean mayHaveSIPrefixes()
Indicates whether this unit may be used with SI prefixes.


mayHaveBinaryPrefixes

public boolean mayHaveBinaryPrefixes()
Indicates whether this unit may be used with binary prefixes.


isDeprecated

public boolean isDeprecated()
Indicates whether this syntax deprecates (but still permits) the use of this unit.


getAbbreviation

public String getAbbreviation()
Returns a symbolic abbreviation for this unit in this syntax. For example, it might return "m" for Metres.


hasNext

public boolean hasNext()
If there is more than one representation for this unit in this syntax, then this will return the next one.

Specified by:
hasNext in interface Iterator<UnitRepresentation>

next

public UnitRepresentation next()
Returns true if hasNext() would succeed.

Specified by:
next in interface Iterator<UnitRepresentation>

remove

public void remove()
Specified by:
remove in interface Iterator<UnitRepresentation>