groovy.lang
Class GString
java.lang.Object
|
+--groovy.lang.GroovyObjectSupport
|
+--groovy.lang.GString
- All Implemented Interfaces:
- GroovyObject
- public abstract class GString
- extends GroovyObjectSupport
Represents a String which contains embedded values such as
"hello there ${user} how are you?"
which can be evaluated lazily.
Advanced users can iterate over the text and values to perform
special processing, such as for performing SQL operations, the
values can be substituted for ? and the actual value objects
can be bound to a JDBC statement.
The lovely name of this class was suggested by Jules Gosnell
and was such a good idea, I couldn't resist :)
- Version:
- $Revision: 1.3 $
- Author:
- James Strachan
GString
public GString(Object values)
GString
public GString(Object[] values)
getStrings
public abstract String[] getStrings()
getValues
public Object[] getValues()
getValueCount
public int getValueCount()
getValue
public Object getValue(int idx)
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2003 The Codehaus. All Rights Reserved.