net.sf.plist
Class NSNumber

java.lang.Object
  extended by net.sf.plist.NSObject
      extended by net.sf.plist.NSNumber
Direct Known Subclasses:
NSInteger, NSReal

public abstract class NSNumber
extends NSObject

Represents a number.
The NSNumber is either an NSInteger or a NSReal.

See Also:
Number

Constructor Summary
NSNumber()
           
 
Method Summary
static NSNumber createInstance(Number number)
          Construct a NSInteger or NSReal.
 Number getValue()
          Get the unmodifiable value of this object.
abstract  Number number()
          Get the contents of this object as a Number.
 
Methods inherited from class net.sf.plist.NSObject
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NSNumber

public NSNumber()
Method Detail

getValue

public Number getValue()
Get the unmodifiable value of this object.

Specified by:
getValue in class NSObject
Returns:
the value of this object
See Also:
number()

number

public abstract Number number()
Get the contents of this object as a Number.

Returns:
the Number

createInstance

public static NSNumber createInstance(Number number)
Construct a NSInteger or NSReal.

Parameters:
number - The number.