| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.template.FastNumber
public final class FastNumber
An unsynchronized, immutable implementation of the TemplateNumberModel
 interface. This avoids the need for synchronization, since we don't have any
 situations where the underlying value changes.
FastBoolean, 
FastHash, 
FastList, 
FastScalar, 
Serialized Form| Constructor Summary | |
|---|---|
FastNumber(long longValue)
Constructs an instance of this object with an initial value.  | 
|
FastNumber(java.lang.Number numberValue)
Constructs an instance of this object with an initial value.  | 
|
FastNumber(java.lang.String stringValue)
Constructs an instance of this object with an initial value.  | 
|
| Method Summary | |
|---|---|
 boolean | 
equals(java.lang.Object o)
Tests this object for equality with the given object.  | 
 long | 
getAsNumber()
Returns the scalar's value as a String. | 
 int | 
hashCode()
Return the hash value for this object.  | 
 boolean | 
isEmpty()
Is the scalar value empty?  | 
 java.lang.String | 
toString()
Return the value of this object as a String. | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public FastNumber(java.lang.String stringValue)
stringValue - the value to store
java.lang.NullPointerException - the value is null
java.lang.NumberFormatException - the value could not be parsed as a longpublic FastNumber(long longValue)
longValue - the value to storepublic FastNumber(java.lang.Number numberValue)
numberValue - the value to store| Method Detail | 
|---|
public long getAsNumber()
                 throws TemplateModelException
String.
getAsNumber in interface TemplateNumberModelTemplateModelException
public boolean isEmpty()
                throws TemplateModelException
isEmpty in interface TemplateModeltrue if this String is empty
 or null, otherwise false.
TemplateModelExceptionpublic java.lang.String toString()
String.
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the object to be compared against
true if the objects are equal, otherwise
 falsepublic int hashCode()
hashCode in class java.lang.Object
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||