public class StringClauses extends Object
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.
toString()
Modifier and Type | Class and Description |
---|---|
static class |
StringClauses.ClauseIterator |
static class |
StringClauses.Comment |
static class |
StringClauses.Delimiter |
static interface |
StringClauses.LiteralClause |
static class |
StringClauses.Whitespace |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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) |
boolean |
equals(Object o) |
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.
|
int |
hashCode() |
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.
|
Object[] |
toArray(boolean stringify) |
String |
toString() |
public StringClauses()
public StringClauses(String separator)
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 enumspublic StringClauses prepend(Enum key, StringClauses clause)
prepend(String, liquibase.util.StringClauses)
when using enumspublic 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 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 enumspublic 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 enumspublic StringClauses.ClauseIterator getClauseIterator()
public Object[] toArray(boolean stringify)
public boolean isEmpty()
Copyright © 2023 Liquibase.org. All rights reserved.