|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sam.toolkit.StringFactory
This class is a String
factory.
Its purpose is to build strings of various length
composed of the same repeated sequence in an efficient way.
Note that all instances of this class should be static
as there is no use for having multiple instances of the same factory
(which would increase cache size).
Field Summary | |
static sam.toolkit.StringFactory |
SPACES
Factory of blank strings (i.e. |
Constructor Summary | |
StringFactory(java.lang.String root)
Builds a new StringFactory |
Method Summary | |
java.lang.String |
get(int length)
Builds the indentation prefix for specified length |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final sam.toolkit.StringFactory SPACES
Constructor Detail |
public StringFactory(java.lang.String root)
StringFactory
root
- the root sequence to repeated.Method Detail |
public java.lang.String get(int length)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |