Groovy JDK

java.lang
Class CharSequence

Method Summary
boolean asBoolean()
Coerce a string (an instance of CharSequence) to a boolean value.
CharSequence getAt(int)
Support the subscript operator for CharSequence.
CharSequence getAt(Range)
Support the range subscript operator for CharSequence
CharSequence getAt(IntRange)
Support the range subscript operator for CharSequence or StringBuffer with IntRange
CharSequence getAt(EmptyRange)
Support the range subscript operator for CharSequence or StringBuffer with EmptyRange
CharSequence getAt(Collection)
Select a List of characters from a CharSequence using a Collection to identify the indices to be selected.
 
Method Detail

asBoolean

public boolean asBoolean()
 
Coerce a string (an instance of CharSequence) to a boolean value. A string is coerced to false if it is of length 0, and to true otherwise.
Returns:
the boolean value
Since:
1.7.0

getAt

public CharSequence getAt(int)
 
Support the subscript operator for CharSequence.
Parameters:
index - the index of the Character to get.
Returns:
the Character at the given index
Since:
1.0

getAt

public CharSequence getAt(Range)
 
Support the range subscript operator for CharSequence
Parameters:
range - a Range.
Returns:
the subsequence CharSequence
Since:
1.0

getAt

public CharSequence getAt(IntRange)
 
Support the range subscript operator for CharSequence or StringBuffer with IntRange
Parameters:
range - an IntRange.
Returns:
the subsequence CharSequence
Since:
1.0

getAt

public CharSequence getAt(EmptyRange)
 
Support the range subscript operator for CharSequence or StringBuffer with EmptyRange
Parameters:
range - an EmptyRange.
Returns:
the subsequence CharSequence
Since:
1.5.0

getAt

public CharSequence getAt(Collection)
 
Select a List of characters from a CharSequence using a Collection to identify the indices to be selected.
Parameters:
indices - a Collection of indices.
Returns:
a CharSequence consisting of the characters at the given indices
Since:
1.0

Groovy JDK