Interface StringProperty
- All Known Subinterfaces:
MutableStringProperty,ObservableStringProperty
- All Known Implementing Classes:
AdaptiveStringProperty,DeserializedStringProperty,FixedStringProperty,JoinedStringProperty,SimpleMutableStringProperty,SimpleObservableStringProperty,StoredStringProperty,StringConfigOption,SystemProperty
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A property with a string value.
-
Method Summary
Modifier and TypeMethodDescriptiondefault JoinedStringPropertyappend(StringProperty stringProperty) Returns a string property whose value is the value of this property, followed by the value ofstringProperty.default JoinedStringPropertystatic StringPropertyfromProperty(Property<String> property) static StringPropertyfromProperty(StringProperty property) default IntPropertyReturns an integer property whose value is the length of the value of this property.default <T> Property<T> Returns a property whose value is the result of parsing the value of this property.default JoinedStringPropertyprepend(StringProperty stringProperty) Returns a string property whose value is the value ofstringProperty, followed by the value of this property.default JoinedStringPropertydefault StringPropertyreplaceNull(String defaultValue) Returns a property whose value is the value of this property, ordefaultValueif the value of this property isnull.default StringPropertyReturns a string property whose value is the value of this property converted to lower case.default StringPropertyReturns this property.default StringPropertyReturns a string property whose value is the value of this property converted to upper case.Methods inherited from interface dev.prozilla.pine.common.property.Property
getValue, getValueOr, hasValue, hasValueProperty, isNotNull, isNotNullProperty, isNull, map, requireValue, snapshot
-
Method Details
-
append
- See Also:
-
append
Returns a string property whose value is the value of this property, followed by the value ofstringProperty.- Parameters:
stringProperty- The string property to append to this property- Returns:
- A joined string property that combines both string properties.
-
prepend
- See Also:
-
prepend
Returns a string property whose value is the value ofstringProperty, followed by the value of this property.- Parameters:
stringProperty- The string property to prepend to this property- Returns:
- A joined string property that combines both string properties.
-
replaceNull
Description copied from interface:PropertyReturns a property whose value is the value of this property, ordefaultValueif the value of this property isnull.- Specified by:
replaceNullin interfaceProperty<String>- Returns:
- A property whose value is never
null.
-
parse
Returns a property whose value is the result of parsing the value of this property.The return value of this method is not restricted to
ParsedProperty, because some string properties use a different implementation. For example, the default implementation ofFixedStringProperty.parse(Parser)returns aFixedObjectProperty, because the input string, and therefore the result of the parser, is never going to change.In case you rely on the return value being of type
ParsedProperty, useParser.parseProperty(StringProperty)instead.- Type Parameters:
T- The type of result of the parser- Parameters:
parser- The parser to use- Returns:
- The parsed property.
- See Also:
-
toStringProperty
Returns this property.- Specified by:
toStringPropertyin interfaceProperty<String>- Returns:
- This property.
-
lengthProperty
Returns an integer property whose value is the length of the value of this property.- Returns:
- An integer property representing the length of the value of this property.
-
toUpperCaseProperty
Returns a string property whose value is the value of this property converted to upper case.- Returns:
- A string property whose value is the value of this property converted to upper case.
-
toLowerCaseProperty
Returns a string property whose value is the value of this property converted to lower case.- Returns:
- A string property whose value is the value of this property converted to lower case.
-
fromProperty
-
fromProperty
-