|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectliquibase.util.StringClauses
public class StringClauses
Defines a list of clauses that can be manipulated and rearranged based on keys associated with each.
On toString()
, the clauses will be joined by the separator passed at construction time and prepended/postpended by the start/end strings set at construction time.
Note: all keys and values passed in are trimmed.
NOTE: All keys are managed in a case INSENSITIVE manner
NOTE: Null or empty clauses and subclauses are skipped in toString()
Nested Class Summary | |
---|---|
static class |
StringClauses.ClauseIterator
|
static class |
StringClauses.Comment
|
static class |
StringClauses.Delimiter
|
static interface |
StringClauses.LiteralClause
|
static class |
StringClauses.Whitespace
|
Constructor Summary | |
---|---|
StringClauses()
Creates a new StringClause with no start or end strings and a space separator. |
|
StringClauses(String separator)
Creates a new StringClause with no start or end strings and the given separator. |
|
StringClauses(String start,
String separator,
String end)
Creates a new StringClause with the given start, end and separator. |
Method Summary | |
---|---|
StringClauses |
append(Enum name,
String clause)
Convenience method for append(String, String) when using enums. |
StringClauses |
append(Enum name,
StringClauses subclauses)
Convenience method for append(String, StringClauses) when using enums. |
StringClauses |
append(String clause)
Adds a new clause at the end of the list. |
StringClauses |
append(StringClauses.LiteralClause literal)
|
StringClauses |
append(String key,
String clause)
Adds a new clause at the end of the list with the given key. |
StringClauses |
append(String key,
StringClauses subclauses)
Adds a new sub-clause at the end of the list with the given key. |
boolean |
contains(String key)
|
String |
get(Enum exitingKey)
Convenience method for get(String) when using enums. |
String |
get(String exitingKey)
Retrieves the given key. |
StringClauses.ClauseIterator |
getClauseIterator()
|
StringClauses |
getSubclause(Enum exitingKey)
Convenience method for getSubclause(String) when using enums |
StringClauses |
getSubclause(String exitingKey)
Retrieves the given key. |
StringClauses |
insertAfter(Enum existingKey,
String newValue)
Convenience method for insertAfter(String, String) when using enums |
StringClauses |
insertAfter(String existingKey,
String newValue)
Convenience method for insertAfter(String, String, String) using the newValue as the newKey. |
StringClauses |
insertAfter(String existingKey,
String newKey,
String newValue)
Inserts a new clause after the given key. |
StringClauses |
insertAfter(String existingKey,
String newKey,
StringClauses newValue)
Inserts a new sub-clause after the given key. |
StringClauses |
insertBefore(Enum existingKey,
Enum newKey,
String newValue)
Convenience method for insertBefore(String, String) when using enums. |
StringClauses |
insertBefore(Enum existingKey,
String newValue)
Convenience method for insertBefore(String, String) when using enums. |
StringClauses |
insertBefore(String existingKey,
String newValue)
Convenience method for insertBefore(String, String, String) where the new clause key is equal to the newValue. |
StringClauses |
insertBefore(String existingKey,
String newKey,
String newValue)
Inserts a new clause before the given key. |
StringClauses |
insertBefore(String existingKey,
String newKey,
StringClauses newValue)
Inserts a new sub-clause before the given key. |
boolean |
isEmpty()
|
StringClauses |
prepend(Enum key,
String clause)
Convenience method for prepend(String, String) when using enums |
StringClauses |
prepend(Enum key,
StringClauses clause)
Convenience method for prepend(String, liquibase.util.StringClauses) when using enums |
StringClauses |
prepend(String clause)
Convenience method for prepend(String, String) that uses the clause as the key. |
StringClauses |
prepend(StringClauses.LiteralClause literal)
|
StringClauses |
prepend(String key,
String clause)
Adds a clause with the given key to the beginning of the list. |
StringClauses |
prepend(String key,
StringClauses clause)
Adds a sub-clause with the given key to the beginning of the list. |
StringClauses |
remove(Enum key)
Convenience method for remove(String) when using enums. |
StringClauses |
remove(String key)
Removes the clause with the given key. |
StringClauses |
replace(Enum key,
String newValue)
Convenience method for replace(String, String) when using enums. |
StringClauses |
replace(Enum key,
StringClauses newValue)
Convenience method for replace(String, liquibase.util.StringClauses) when using enums. |
StringClauses |
replace(String key,
String newValue)
Replaces the given key with a new string. |
StringClauses |
replace(String key,
StringClauses newValue)
Replaces the given key with a new sub-clause. |
StringClauses |
replaceIfExists(String key,
String newValue)
Replaces the given key with a new string. |
Object[] |
toArray(boolean stringify)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StringClauses()
public StringClauses(String separator)
public StringClauses(String start, String separator, String end)
Method Detail |
---|
public StringClauses append(String key, String clause)
public StringClauses append(String key, StringClauses subclauses)
public StringClauses append(String clause)
public StringClauses append(Enum name, StringClauses subclauses)
append(String, StringClauses)
when using enums.
public StringClauses append(Enum name, String clause)
append(String, String)
when using enums.
public StringClauses append(StringClauses.LiteralClause literal)
public StringClauses prepend(StringClauses.LiteralClause literal)
public StringClauses prepend(String key, String clause)
public StringClauses prepend(String key, StringClauses clause)
public StringClauses prepend(String clause)
prepend(String, String)
that uses the clause as the key.
public StringClauses prepend(Enum key, String clause)
prepend(String, String)
when using enums
public StringClauses prepend(Enum key, StringClauses clause)
prepend(String, liquibase.util.StringClauses)
when using enums
public StringClauses remove(String key)
public StringClauses remove(Enum key)
remove(String)
when using enums.
public StringClauses replace(String key, String newValue) throws IllegalArgumentException
IllegalArgumentException
public StringClauses replaceIfExists(String key, String newValue) throws IllegalArgumentException
IllegalArgumentException
public boolean contains(String key)
public StringClauses replace(String key, StringClauses newValue)
public StringClauses replace(Enum key, StringClauses newValue)
replace(String, liquibase.util.StringClauses)
when using enums.
public StringClauses replace(Enum key, String newValue)
replace(String, String)
when using enums.
public StringClauses insertBefore(String existingKey, String newKey, String newValue) throws IllegalArgumentException
IllegalArgumentException
public StringClauses insertBefore(String existingKey, String newKey, StringClauses newValue)
public StringClauses insertBefore(String existingKey, String newValue)
insertBefore(String, String, String)
where the new clause key is equal to the newValue.
public StringClauses insertBefore(Enum existingKey, String newValue)
insertBefore(String, String)
when using enums.
public StringClauses insertBefore(Enum existingKey, Enum newKey, String newValue)
insertBefore(String, String)
when using enums.
public StringClauses insertAfter(String existingKey, String newKey, String newValue)
public StringClauses insertAfter(String existingKey, String newKey, StringClauses newValue)
public StringClauses insertAfter(Enum existingKey, String newValue)
insertAfter(String, String)
when using enums
public StringClauses insertAfter(String existingKey, String newValue)
insertAfter(String, String, String)
using the newValue as the newKey.
public String get(String exitingKey)
public String get(Enum exitingKey)
get(String)
when using enums.
public StringClauses getSubclause(String exitingKey)
public StringClauses getSubclause(Enum exitingKey)
getSubclause(String)
when using enums
public StringClauses.ClauseIterator getClauseIterator()
public String toString()
toString
in class Object
public Object[] toArray(boolean stringify)
public boolean isEmpty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |