- java.lang.Object
-
- org.praxislive.core.Value
-
- org.praxislive.core.types.PString
-
- All Implemented Interfaces:
Comparable<PString>
public final class PString extends Value implements Comparable<PString>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.praxislive.core.Value
Value.Type<T extends Value>
-
-
Field Summary
Fields Modifier and Type Field Description static PString
EMPTY
static String
KEY_ALLOWED_VALUES
static String
KEY_EMPTY_IS_DEFAULT
static String
KEY_MIME_TYPE
static String
KEY_SUGGESTED_VALUES
static String
KEY_TEMPLATE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(PString o)
boolean
equals(Object obj)
Values must override the default equals method.static Optional<PString>
from(Value arg)
int
hashCode()
Values must override the default hashcode method.static ArgumentInfo
info()
static ArgumentInfo
info(String... allowed)
static PString
of(Object obj)
static PString
of(String str)
String
toString()
Values must override the default method to return a string representation that is immutable.String
value()
-
Methods inherited from class org.praxislive.core.Value
equivalent, isEmpty, ofObject, type
-
-
-
-
Field Detail
-
KEY_ALLOWED_VALUES
public static final String KEY_ALLOWED_VALUES
- See Also:
- Constant Field Values
-
KEY_SUGGESTED_VALUES
public static final String KEY_SUGGESTED_VALUES
- See Also:
- Constant Field Values
-
KEY_TEMPLATE
public static final String KEY_TEMPLATE
- See Also:
- Constant Field Values
-
KEY_MIME_TYPE
public static final String KEY_MIME_TYPE
- See Also:
- Constant Field Values
-
KEY_EMPTY_IS_DEFAULT
public static final String KEY_EMPTY_IS_DEFAULT
- See Also:
- Constant Field Values
-
EMPTY
public static final PString EMPTY
-
-
Method Detail
-
value
public String value()
-
toString
public String toString()
Description copied from class:Value
Values must override the default method to return a string representation that is immutable.
-
hashCode
public int hashCode()
Description copied from class:Value
Values must override the default hashcode method.
-
equals
public boolean equals(Object obj)
Description copied from class:Value
Values must override the default equals method. This method should only returntrue
if the supplied Object is of the same type as the implementing Value. Values of an unknown type should be coerced before calling this method. This method does not have to guarantee thatthis.equals(that) == this.toString().equals(that.toString())
-
info
public static ArgumentInfo info()
-
info
public static ArgumentInfo info(String... allowed)
-
compareTo
public int compareTo(PString o)
- Specified by:
compareTo
in interfaceComparable<PString>
-
-