java.lang.Object
org.kink_lang.kink.HostResultCore
org.kink_lang.kink.Val
org.kink_lang.kink.StrVal
- All Implemented Interfaces:
Comparable<StrVal>,HostResult,Just<StrVal>,OpResult<StrVal>
A str val.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
-
Method Summary
Methods inherited from class org.kink_lang.kink.Val
getVar, getVarSymHandleSet, hasVar, makeHostResultCore, setVarMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kink_lang.kink.op.Just
justOrNull
-
Method Details
-
string
Returns the string.- Returns:
- the string.
-
just
Returns this. -
isEmpty
public boolean isEmpty()Returns whether the string is empty.- Returns:
- whether the string is empty.
-
concat
Returns a str value concatenatingthisandtail. If the result size overflows, the method returnsOpError.- Parameters:
tail- str val to concatenate.- Returns:
- a str value concatenating
thisandtail.
-
toString
-
hashCode
public int hashCode() -
equals
-
compareTo
Compares two str values in the order of code points.- Specified by:
compareToin interfaceComparable<StrVal>- Parameters:
arg- the str value to be compared.- Returns:
- 0 if two strings are equal;
less than 0 if
thisstring is smaller; otherwise greater than 0.
-