freemarker.template
Class SimpleScalar
java.lang.Object
freemarker.template.SimpleScalar
- Serializable, TemplateModel, TemplateScalarModel
public final class SimpleScalar
extends java.lang.Object
A simple implementation of the
TemplateScalarModel
interface, using a
String.
As of version 2.0 this object is immutable.
This class is thread-safe.
$Id: SimpleScalar.java,v 1.38 2004/09/10 20:50:45 ddekany Exp $
SimpleScalar(String value) - Constructs a SimpleScalar containing a string value.
|
SimpleScalar
public SimpleScalar(String value)
Constructs a SimpleScalar containing a string value.
value
- the string value.
getAsString
public String getAsString()
Returns the string representation of this model. In general, avoid
returning null. In compatibility mode the engine will convert
null into empty string, however in normal mode it will
throw an exception if you return null from this method.
- getAsString in interface TemplateScalarModel
toString
public String toString()