|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.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 FormConstructor 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 storeMethod Detail |
---|
public java.lang.String getAsString() throws TemplateModelException
String
.
getAsString
in interface TemplateScalarModel
TemplateModelException
public boolean isEmpty() throws TemplateModelException
isEmpty
in interface TemplateModel
true
if this String
is empty
or null
, otherwise false
.
TemplateModelException
public java.lang.String toString()
String
.
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to compare against
true
if the objects are equal, otherwise
false
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |