Constructor and Description |
---|
NSNumber() |
Modifier and Type | Method and Description |
---|---|
static NSNumber |
createInstance(java.lang.Number number)
|
java.lang.Number |
getValue()
Get the unmodifiable value of this object.
|
boolean |
isTrue()
Return whether or not the value evaluates to true.
|
abstract java.lang.Number |
toNumber()
Get the contents of this object as a
Number . |
public java.lang.Number getValue()
getValue
in class NSObject
toNumber()
public abstract java.lang.Number toNumber()
Number
.public static NSNumber createInstance(java.lang.Number number)
number
- The number.public final boolean isTrue()
Return whether or not the value evaluates to true.
A value returns to true if and only if
NSBoolean
type NSBoolean.TRUE
NSString
which has a length greater than zero and does not equal "NO" or "False" (case insensitive)NSNumber
greater than 0NSCollection
which contains more than zero elementsNSDate
NSData
with a length greater than 0