James Strachan: The lovely name of this class was suggested by Jules Gosnell and was such a good idea, I couldn't resist :)
| Modifier and Type | Field and Description |
|---|---|
| public static final GString | EMPTY
A GString containing a single empty String and no values. |
| public static final Object[] | |
| public static final String[] | |
| private static final String | |
| private static final long | |
| private final Object[] | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private String[] | |
| private Object[] | |
| public void | |
| private int | |
| public char | charAt(int
the index of the index)char value to be returnedImplements java. char value at the specified index.
|
| public int | compareTo(Object
the object to be compared. that)Implements java. |
| public boolean | equals(Object
the reference object with which to compare. that)Overrides java. |
| public boolean | |
| public byte[] | |
| public byte[] | |
| public abstract String[] | |
| public Object | |
| public int | |
| public Object[] | |
| public int | |
| public Object | invokeMethod(String
the name of the method to call name, Object the arguments to use for the method call args)Overrides default groovy. |
| public int | |
| public Pattern | |
| public GString | |
| public GString | |
| public CharSequence | subSequence(int
the start index, inclusive start, int the end index, exclusive end)Implements java. CharSequence that is a subsequence of this sequence.
|
| public String | toString()
Overrides java. Implements java. |
| public Writer | writeTo(Writer
the Writer to which this Writable should output its data. out)Implements groovy. |
| EMPTY | back to summary |
|---|---|
| public static final GString EMPTY A GString containing a single empty String and no values. | |
| EMPTY_OBJECT_ARRAY | back to summary |
|---|---|
| public static final Object[] EMPTY_OBJECT_ARRAY | |
| EMPTY_STRING_ARRAY | back to summary |
|---|---|
| public static final String[] EMPTY_STRING_ARRAY | |
| MKP | back to summary |
|---|---|
| private static final String MKP | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| values | back to summary |
|---|---|
| private final Object[] values | |
| YIELD | back to summary |
|---|---|
| private static final String YIELD | |
| GString | back to summary |
|---|---|
| public GString(Object values) | |
| GString | back to summary |
|---|---|
| public GString(Object[] values) | |
| appendStrings | back to summary |
|---|---|
| private String[] appendStrings(String[] strings, String[] thatStrings, int valuesLength) | |
| appendValues | back to summary |
|---|---|
| private Object[] appendValues(Object[] values, Object[] thatValues) | |
| build | back to summary |
|---|---|
| public void build(final GroovyObject builder) Implements groovy.
| |
| calcInitialCapacity | back to summary |
|---|---|
| private int calcInitialCapacity() | |
| charAt | back to summary |
|---|---|
| public char charAt(int index) Implements java. Doc from java. Returns the If the
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(Object that) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| equals | back to summary |
|---|---|
| public boolean equals(Object that) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| equals | back to summary |
|---|---|
| public boolean equals(GString that) | |
| getBytes | back to summary |
|---|---|
| public byte[] getBytes() | |
| getBytes | back to summary |
|---|---|
| public byte[] getBytes(String charset) throws UnsupportedEncodingException | |
| getStrings | back to summary |
|---|---|
| public abstract String[] getStrings() | |
| getValue | back to summary |
|---|---|
| public Object getValue(int idx) | |
| getValueCount | back to summary |
|---|---|
| public int getValueCount() | |
| getValues | back to summary |
|---|---|
| public Object[] getValues() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| invokeMethod | back to summary |
|---|---|
| public Object invokeMethod(String name, Object args) Overrides default groovy. Overloaded to implement duck typing for Strings so that any method that can't be evaluated on this object will be forwarded to the toString() object instead.
| |
| length | back to summary |
|---|---|
| public int length() Implements java. Doc from java. Returns the length of this character sequence. The length is the number
of 16-bit
| |
| negate | back to summary |
|---|---|
| public Pattern negate() Turns a String into a regular expression pattern
| |
| plus | back to summary |
|---|---|
| public GString plus(GString that) | |
| plus | back to summary |
|---|---|
| public GString plus(String that) | |
| subSequence | back to summary |
|---|---|
| public CharSequence subSequence(int start, int end) Implements java. Doc from java. Returns a
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements java. Doc from java. Returns a string containing the characters in this sequence in the same order as this sequence. The length of the string will be the length of this sequence. | |
| writeTo | back to summary |
|---|---|
| public Writer writeTo(Writer out) throws IOException Implements groovy. Doc from groovy. Writes this object to the given writer. This is used to defer content creation until the point when it is streamed to the output destination. Oftentimes, content will be defined but not necessarily created (as is may be the case with a Closure definition.) In that case, the output is then 'deferred' to the point when it is serialized to the writer. This class may be used whenever an object should be responsible for creating its own textual representation, but creating the entire output as a single String would be inefficient (such as outputting a multi-gigabyte XML document.)
| |