|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
T - The type of this textual object.@Participant(value="Flyweight") public interface Textual<T>
A textual object represents a flyweight object that is a char sequence and comparable to its own type.
The value of a textual object is its toString()
representation.
| Method Summary | |
|---|---|
int |
indexOfIgnoreCase(CharSequence sequence,
int index,
Locale locale)
Finds the first index where sequence is present in this
textual representation from the index supplied, regardless of case,
or -1 if sequence cannot be found. |
String |
lowerCaseFirst(Locale locale)
Return the first character of this textual representation lower cased. |
String |
upperCaseFirst(Locale locale)
Return the first character of this textual representation upper cased. |
| Methods inherited from interface java.lang.CharSequence |
|---|
charAt, length, subSequence, toString |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
int indexOfIgnoreCase(CharSequence sequence,
int index,
Locale locale)
sequence is present in this
textual representation from the index supplied, regardless of case,
or -1 if sequence cannot be found.
index is allowed to be larger than the length of
this textual representation, in which case this method returns -1.
The supplied locale is used to perform the case conversion.
sequence - The char sequence to find; cannot be null.index - The index to start at; cannot be negative.locale - The locale to use; can be null, in which case
the default locale is used.
sequence from index,
regardless of case, or -1 if not found.
NullPointerException - If sequence is null.
IndexOutOfBoundsException - If index is negative.String lowerCaseFirst(Locale locale)
Note, that in some locales, shifting case of a given character may cause it to expand into more than one character! Hence, the return type is a string.
locale - The locale to use; can be null, in which
case the default locale is used.
String upperCaseFirst(Locale locale)
Note, that in some locales, shifting case of a given character may cause it to expand into more than one character! Hence, the return type is a string.
locale - The locale to use; can be null, in which
case the default locale is used.
|
Gunni Rode / rode.dk | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||