Class FixedStringProperty
java.lang.Object
dev.prozilla.pine.common.property.fixed.FixedObjectProperty<String>
dev.prozilla.pine.common.property.fixed.FixedStringProperty
- All Implemented Interfaces:
Cloneable<FixedObjectProperty<String>>,FixedProperty<String>,Property<String>,StringProperty,Functor<String>
public class FixedStringProperty
extends FixedObjectProperty<String>
implements StringProperty, FixedProperty<String>
-
Field Summary
Fields inherited from class dev.prozilla.pine.common.property.fixed.FixedObjectProperty
value -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an integer property whose value is the length of the value of this property.<T> FixedProperty<T> Returns a property whose value is the result of parsing the value of this property.replaceNull(String defaultValue) Returns a property whose value is the value of this property, ordefaultValueif the value of this property isnull.snapshot()Returns a fixed property whose value is the current value of this property, at the time of calling this method.Returns a string property whose value is the value of this property converted to lower case.Returns this property.Returns a string property whose value is the value of this property converted to upper case.Methods inherited from class dev.prozilla.pine.common.property.fixed.FixedObjectProperty
clone, equals, equals, getValueMethods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.prozilla.pine.common.property.fixed.FixedProperty
hasValueProperty, isNotNullProperty, mapMethods inherited from interface dev.prozilla.pine.common.property.Property
getValue, getValueOr, hasValue, isNotNull, isNull, requireValueMethods inherited from interface dev.prozilla.pine.common.property.StringProperty
append, append, prepend, prepend
-
Constructor Details
-
FixedStringProperty
-
-
Method Details
-
parse
Description copied from interface:StringPropertyReturns 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 ofparse(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.- Specified by:
parsein interfaceStringProperty- 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 interfaceFixedProperty<String>- Specified by:
toStringPropertyin interfaceProperty<String>- Specified by:
toStringPropertyin interfaceStringProperty- Returns:
- This property.
-
snapshot
Description copied from interface:PropertyReturns a fixed property whose value is the current value of this property, at the time of calling this method. -
lengthProperty
Description copied from interface:StringPropertyReturns an integer property whose value is the length of the value of this property.- Specified by:
lengthPropertyin interfaceStringProperty- Returns:
- An integer property representing the length of the value of this property.
-
toUpperCaseProperty
Description copied from interface:StringPropertyReturns a string property whose value is the value of this property converted to upper case.- Specified by:
toUpperCasePropertyin interfaceStringProperty- Returns:
- A string property whose value is the value of this property converted to upper case.
-
toLowerCaseProperty
Description copied from interface:StringPropertyReturns a string property whose value is the value of this property converted to lower case.- Specified by:
toLowerCasePropertyin interfaceStringProperty- Returns:
- A string property whose value is the value of this property converted to lower case.
-
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 interfaceFixedProperty<String>- Specified by:
replaceNullin interfaceProperty<String>- Specified by:
replaceNullin interfaceStringProperty- Returns:
- A property whose value is never
null.
-