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()
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class | |
| public static class | |
| public static interface | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private LinkedHashMap | |
| private final String | |
| private final Random | |
| private final String | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | StringClauses(String separator)
Creates a new StringClause with no start or end strings and the given separator. |
| public | StringClauses(String start, String separator, String end)
Creates a new StringClause with the given start, end and separator. |
| Modifier and Type | Method and Description |
|---|---|
| public StringClauses | |
| public StringClauses | append(String key, StringClauses subclauses)
Adds a new sub-clause at the end of the list with the given key. |
| public StringClauses | |
| public StringClauses | append(Enum<E extends Enum<E>> name, StringClauses subclauses)
Convenience method for |
| public StringClauses | append(Enum<E extends Enum<E>> name, String clause)
Convenience method for |
| public StringClauses | |
| public boolean | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public String | |
| public String | |
| public StringClauses. | |
| private Object | |
| public StringClauses | |
| public StringClauses | getSubclause(Enum<E extends Enum<E>> exitingKey)
Convenience method for |
| public int | |
| public StringClauses | insertAfter(String existingKey, String newKey, String newValue)
Inserts a new clause after the given key. |
| public StringClauses | insertAfter(String existingKey, String newKey, StringClauses newValue)
Inserts a new sub-clause after the given key. |
| public StringClauses | insertAfter(Enum<E extends Enum<E>> existingKey, String newValue)
Convenience method for |
| public StringClauses | insertAfter(String existingKey, String newValue)
Convenience method for |
| private StringClauses | |
| public StringClauses | insertBefore(String existingKey, String newKey, String newValue)
Inserts a new clause before the given key. |
| public StringClauses | insertBefore(String existingKey, String newKey, StringClauses newValue)
Inserts a new sub-clause before the given key. |
| public StringClauses | insertBefore(String existingKey, String newValue)
Convenience method for |
| public StringClauses | insertBefore(Enum<E extends Enum<E>> existingKey, String newValue)
Convenience method for |
| public StringClauses | insertBefore(Enum<E extends Enum<E>> existingKey, Enum<E extends Enum<E>> newKey, String newValue)
Convenience method for |
| private StringClauses | |
| public boolean | |
| public StringClauses | |
| public StringClauses | |
| public StringClauses | prepend(String key, StringClauses clause)
Adds a sub-clause with the given key to the beginning of the list. |
| public StringClauses | prepend(String clause)
Convenience method for |
| public StringClauses | prepend(Enum<E extends Enum<E>> key, String clause)
Convenience method for |
| public StringClauses | prepend(Enum<E extends Enum<E>> key, StringClauses clause)
Convenience method for |
| private StringClauses | |
| public StringClauses | |
| public StringClauses | |
| public StringClauses | |
| public StringClauses | |
| public StringClauses | replace(Enum<E extends Enum<E>> key, StringClauses newValue)
Convenience method for |
| public StringClauses | replace(Enum<E extends Enum<E>> key, String newValue)
Convenience method for |
| private StringClauses | |
| public Object[] | |
| public String | |
| private String |
| clauses | back to summary |
|---|---|
| private LinkedHashMap<String, Object> clauses | |
| end | back to summary |
|---|---|
| private final String end | |
| random | back to summary |
|---|---|
| private final Random random | |
| separator | back to summary |
|---|---|
| private final String separator | |
| start | back to summary |
|---|---|
| private final String start | |
| StringClauses | back to summary |
|---|---|
| public StringClauses() Creates a new StringClause with no start or end strings and a space separator. | |
| StringClauses | back to summary |
|---|---|
| public StringClauses(String separator) Creates a new StringClause with no start or end strings and the given separator. | |
| StringClauses | back to summary |
|---|---|
| public StringClauses(String start, String separator, String end) Creates a new StringClause with the given start, end and separator. | |
| append | back to summary |
|---|---|
| public StringClauses append(String key, String clause) Adds a new clause at the end of the list with the given key. | |
| append | back to summary |
|---|---|
| public StringClauses append(String key, StringClauses subclauses) Adds a new sub-clause at the end of the list with the given key. | |
| append | back to summary |
|---|---|
| public StringClauses append(String clause) Adds a new clause at the end of the list. The key is equal to the passed clause. There is no corresponding append with just a StringClauses because the subclause may not be fully created when appended and so the key may be an unexpected value. | |
| append | back to summary |
|---|---|
| public StringClauses append(Enum<E extends Enum<E>> name, StringClauses subclauses) Convenience method for | |
| append | back to summary |
|---|---|
| public StringClauses append(Enum<E extends Enum<E>> name, String clause) Convenience method for | |
| append | back to summary |
|---|---|
| public StringClauses append(StringClauses. | |
| contains | back to summary |
|---|---|
| public boolean contains(String key) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| get | back to summary |
|---|---|
| public String get(String exitingKey) Retrieves the given key. Returns null if not set. If clause at key is a StringClause, return the string version of it. Will traverse sub-clauses to find the key. | |
| get | back to summary |
|---|---|
| public String get(Enum<E extends Enum<E>> exitingKey) Convenience method for | |
| getClauseIterator | back to summary |
|---|---|
| public StringClauses. | |
| getImpl | back to summary |
|---|---|
| private Object getImpl(String exitingKey) | |
| getSubclause | back to summary |
|---|---|
| public StringClauses getSubclause(String exitingKey) Retrieves the given key. Returns null if not set. If clause at key is a String, return a new StringClause version of it. Will traverse sub-clauses to find the key. | |
| getSubclause | back to summary |
|---|---|
| public StringClauses getSubclause(Enum<E extends Enum<E>> exitingKey) Convenience method for | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| insertAfter | back to summary |
|---|---|
| public StringClauses insertAfter(String existingKey, String newKey, String newValue) Inserts a new clause after the given key. Throws IllegalArgumentException if the existingKey does not exist. | |
| insertAfter | back to summary |
|---|---|
| public StringClauses insertAfter(String existingKey, String newKey, StringClauses newValue) Inserts a new sub-clause after the given key. Throws IllegalArgumentException if the existingKey does not exist. | |
| insertAfter | back to summary |
|---|---|
| public StringClauses insertAfter(Enum<E extends Enum<E>> existingKey, String newValue) Convenience method for | |
| insertAfter | back to summary |
|---|---|
| public StringClauses insertAfter(String existingKey, String newValue) Convenience method for | |
| insertAfterImpl | back to summary |
|---|---|
| private StringClauses insertAfterImpl(String existingKey, String newKey, Object newValue) | |
| insertBefore | back to summary |
|---|---|
| public StringClauses insertBefore(String existingKey, String newKey, String newValue) throws IllegalArgumentException Inserts a new clause before the given key. Throws IllegalArgumentException if the existingKey does not exist. | |
| insertBefore | back to summary |
|---|---|
| public StringClauses insertBefore(String existingKey, String newKey, StringClauses newValue) Inserts a new sub-clause before the given key. Throws IllegalArgumentException if the existingKey does not exist. | |
| insertBefore | back to summary |
|---|---|
| public StringClauses insertBefore(String existingKey, String newValue) Convenience method for | |
| insertBefore | back to summary |
|---|---|
| public StringClauses insertBefore(Enum<E extends Enum<E>> existingKey, String newValue) Convenience method for | |
| insertBefore | back to summary |
|---|---|
| public StringClauses insertBefore(Enum<E extends Enum<E>> existingKey, Enum<E extends Enum<E>> newKey, String newValue) Convenience method for | |
| insertBeforeImpl | back to summary |
|---|---|
| private StringClauses insertBeforeImpl(String existingKey, String newKey, Object newValue) | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() | |
| prepend | back to summary |
|---|---|
| public StringClauses prepend(StringClauses. | |
| prepend | back to summary |
|---|---|
| public StringClauses prepend(String key, String clause) Adds a clause with the given key to the beginning of the list. | |
| prepend | back to summary |
|---|---|
| public StringClauses prepend(String key, StringClauses clause) Adds a sub-clause with the given key to the beginning of the list. | |
| prepend | back to summary |
|---|---|
| public StringClauses prepend(String clause) Convenience method for | |
| prepend | back to summary |
|---|---|
| public StringClauses prepend(Enum<E extends Enum<E>> key, String clause) Convenience method for | |
| prepend | back to summary |
|---|---|
| public StringClauses prepend(Enum<E extends Enum<E>> key, StringClauses clause) Convenience method for | |
| prependImpl | back to summary |
|---|---|
| private StringClauses prependImpl(String key, Object clause) throws IllegalArgumentException | |
| remove | back to summary |
|---|---|
| public StringClauses remove(String key) Removes the clause with the given key. Removes case insensitively. If key doesn't exist, operation is a no-op. | |
| remove | back to summary |
|---|---|
| public StringClauses remove(Enum<E extends Enum<E>> key) Convenience method for | |
| replace | back to summary |
|---|---|
| public StringClauses replace(String key, String newValue) throws IllegalArgumentException Replaces the given key with a new string. If the existing key does not exist, throws IllegalArgumentException | |
| replace | back to summary |
|---|---|
| public StringClauses replace(String key, StringClauses newValue) Replaces the given key with a new sub-clause. If the existing key does not exist, throws IllegalArgumentException | |
| replace | back to summary |
|---|---|
| public StringClauses replace(Enum<E extends Enum<E>> key, StringClauses newValue) Convenience method for | |
| replace | back to summary |
|---|---|
| public StringClauses replace(Enum<E extends Enum<E>> key, String newValue) Convenience method for | |
| replaceImpl | back to summary |
|---|---|
| private StringClauses replaceImpl(String key, Object newValue) | |
| toArray | back to summary |
|---|---|
| public Object[] toArray(boolean stringify) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| uniqueKey | back to summary |
|---|---|
| private String uniqueKey(String key) Returns the key if it is not empty and/or not already used. If it is already used, it generates a random value for the key. | |
| Modifier and Type | Field and Description |
|---|---|
| private final LinkedHashMap | |
| private final ListIterator |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public Object | |
| public Object | |
| public void | remove()
Overrides default java. Removes from the underlying collection the last element returned by this iterator (optional operation). |
| public void |
| clauses | back to summary |
|---|---|
| private final LinkedHashMap<String, Object> clauses | |
| keyIterator | back to summary |
|---|---|
| private final ListIterator<String> keyIterator | |
| ClauseIterator | back to summary |
|---|---|
| public ClauseIterator(LinkedHashMap<String, Object> clauses) | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public Object next() Implements java. Doc from java. Returns the next element in the iteration. | |
| nextNonWhitespace | back to summary |
|---|---|
| public Object nextNonWhitespace() | |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
| |
| replace | back to summary |
|---|---|
| public void replace(Object newClause) | |
| Modifier and Type | Method and Description |
|---|---|
| public String | toString()
Overrides java. Implements liquibase. Returns a string representation of the object. |
| value | back to summary |
|---|---|
| private final String value | |
| Comment | back to summary |
|---|---|
| public Comment(String value) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements liquibase. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Method and Description |
|---|---|
| public String | toString()
Overrides java. Implements liquibase. Returns a string representation of the object. |
| value | back to summary |
|---|---|
| private final String value | |
| Delimiter | back to summary |
|---|---|
| public Delimiter(String value) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements liquibase. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| toString | back to summary |
|---|---|
| public String toString() | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | toString()
Overrides java. Implements liquibase. Returns a string representation of the object. |
| value | back to summary |
|---|---|
| private final String value | |
| Whitespace | back to summary |
|---|---|
| public Whitespace(String value) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements liquibase. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |