Project Wonder 2.0

er.extensions
Class ERXUnitAwareDecimalFormat.UnitPrefix

java.lang.Object
  extended byer.extensions.ERXUnitAwareDecimalFormat.UnitPrefix
All Implemented Interfaces:
NSKeyValueCoding
Enclosing class:
ERXUnitAwareDecimalFormat

public static class ERXUnitAwareDecimalFormat.UnitPrefix
extends Object
implements NSKeyValueCoding

UnitPrefix is an inner class


Nested Class Summary
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Field Summary
protected  double multiplyingFactor
           
protected  String unitName
           
protected  String unitSymbol
           
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
_CLASS, NullValue
 
Constructor Summary
ERXUnitAwareDecimalFormat.UnitPrefix(String unitSymbol, String unitName, double multiplyingFactor)
           
 
Method Summary
 double adjustScale(double number)
           
 double adjustScale(long number)
           
static ERXUnitAwareDecimalFormat.UnitPrefix findAppropriatePrefix(double number, NSArray unitPrefixArray)
           
 double multiplyingFactor()
           
 void takeValueForKey(Object value, String key)
           
 String toString()
           
 String unitName()
           
static NSArray unitPrefixArrayForUnit(String unitName)
           
 String unitSymbol()
           
 Object valueForKey(String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

unitSymbol

protected final String unitSymbol

unitName

protected final String unitName

multiplyingFactor

protected final double multiplyingFactor
Constructor Detail

ERXUnitAwareDecimalFormat.UnitPrefix

public ERXUnitAwareDecimalFormat.UnitPrefix(String unitSymbol,
                                            String unitName,
                                            double multiplyingFactor)
Method Detail

unitSymbol

public String unitSymbol()

unitName

public String unitName()

multiplyingFactor

public double multiplyingFactor()

adjustScale

public double adjustScale(double number)

adjustScale

public double adjustScale(long number)

unitPrefixArrayForUnit

public static NSArray unitPrefixArrayForUnit(String unitName)

findAppropriatePrefix

public static ERXUnitAwareDecimalFormat.UnitPrefix findAppropriatePrefix(double number,
                                                                         NSArray unitPrefixArray)

valueForKey

public Object valueForKey(String key)
Specified by:
valueForKey in interface NSKeyValueCoding

takeValueForKey

public void takeValueForKey(Object value,
                            String key)
Specified by:
takeValueForKey in interface NSKeyValueCoding

toString

public String toString()

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.