Package org.eclipse.ditto.rql.model
Class ParsedPlaceholder
java.lang.Object
org.eclipse.ditto.rql.model.ParsedPlaceholder
- All Implemented Interfaces:
CharSequence
Holds a String representing a
Placeholder in the form: prefix:name.
The supported placeholder prefixes are defined in the RqlPredicateParser.-
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) booleangetName()Returns the placeholder name.Returns the placeholder prefix.inthashCode()intlength()static ParsedPlaceholderof(CharSequence placeholderWithPrefix) Creates a new ParsedPlaceholder from the passed char sequence ensuring that it is in the format<prefix>:<name>.subSequence(int start, int end) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Method Details
-
of
Creates a new ParsedPlaceholder from the passed char sequence ensuring that it is in the format<prefix>:<name>.- Parameters:
placeholderWithPrefix- the char sequence containing the placeholder in format<prefix>:<name>.- Returns:
- the ParsedPlaceholder instance.
- Throws:
NullPointerException- if the passedplaceholderWithPrefixwasnull.IllegalArgumentException- if the passedplaceholderWithPrefixwas not in the expected format.
-
getPrefix
Returns the placeholder prefix.- Returns:
- the placeholder prefix.
-
getName
Returns the placeholder name.- Returns:
- the placeholder name.
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
equals
-
hashCode
public int hashCode() -
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-