|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.utils.string.StringTypesUtils
public final class StringTypesUtils
Utility Class bundling common/useful methods for different string types (StringBuider, String, Charsequence, ...). Might get split up into several classes when becoming too big.
| Method Summary | |
|---|---|
static void |
assertWhitespaceFree(java.lang.CharSequence value,
java.lang.String valueDescription)
|
static void |
assertWhitespaceFree(java.lang.CharSequence value,
java.lang.String formatString,
java.lang.Object... formatObjects)
Assert that given string is free of whitespaces as determined by Character.isWhitespace(char). |
static char |
lastChar(java.lang.StringBuilder sb)
|
static void |
replaceEnd(java.lang.StringBuilder sb,
int reverseOffsetFromEnd,
java.lang.CharSequence string)
Used to replace the end of the current buffer, starting at reverseOffsetFromEnd. |
static java.lang.CharSequence |
right(java.lang.StringBuilder sb,
int len)
returns the CharSequence from the right but at most the whole buffer no matter how large len is. |
static java.lang.StringBuilder |
setLengthRelative(java.lang.StringBuilder sb,
int len)
Add or subtract the len to the current length. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.StringBuilder setLengthRelative(java.lang.StringBuilder sb,
int len)
sb - the sblen - the length postive values will increase the buffer, negative will decrease. Latter case will not cause an
exception if by this the length will be < 0 but will set it to 0.
public static java.lang.CharSequence right(java.lang.StringBuilder sb,
int len)
CharSequence from the right but at most the whole buffer no matter how large len is.
sb - the sblen - the len
public static char lastChar(java.lang.StringBuilder sb)
mainQuery -
public static void replaceEnd(java.lang.StringBuilder sb,
int reverseOffsetFromEnd,
java.lang.CharSequence string)
sb - the sbreverseOffsetFromEnd - will be subtracted from length of sb, negative numbers will result in \0 being inserted. Must not be >1
sb.lengthstring - the string
public static void assertWhitespaceFree(java.lang.CharSequence value,
java.lang.String valueDescription)
valueDescription - literalFilter -
public static void assertWhitespaceFree(java.lang.CharSequence value,
java.lang.String formatString,
java.lang.Object... formatObjects)
Character.isWhitespace(char).
value - the valueformatString - the format stringformatObjects - the format objects
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||