|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.template.FastScalar
public final class FastScalar
An unsynchronized, immutable variation of the SimpleScalar class.
This avoids the need for synchronization, since we no longer have any
situations where the underlying value changes. This means that
FastScalar should be significantly faster in some cases.
FastBoolean,
FastHash,
FastList,
FastNumber,
Serialized Form| Constructor Summary | |
|---|---|
FastScalar(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. |
java.lang.String |
getAsString()
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 FastScalar(java.lang.String stringValue)
stringValue - the value to store| Method Detail |
|---|
public java.lang.String getAsString()
throws TemplateModelException
String.
getAsString in interface TemplateScalarModelTemplateModelException
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 compare 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 | ||||||||