public final class OCamlString extends OCamlValue implements java.lang.CharSequence
OCamlString class is the wrapper class for OCaml values of
type string.| Modifier and Type | Field and Description |
|---|---|
static Wrapper<OCamlString> |
WRAPPER
Wrapper for
OCamlString values. |
| Modifier and Type | Method and Description |
|---|---|
byte |
byteAt(int idx)
Returns the
byte value at the specified index. |
char |
charAt(int idx) |
static OCamlString |
create(java.lang.String v)
Constructs a new
string value, and wraps it. |
boolean |
equals(java.lang.Object obj) |
Wrapper<? extends OCamlString> |
getWrapper()
Returns the wrapper used to wrap
Value elements into
instances of the current class. |
Wrapper<? extends OCamlValue> |
getWrapper(int idx)
Returns the wrapper used to wrap
Value elements into
instances of the embedded type at given index. |
int |
hashCode() |
int |
length() |
void |
setByteAt(int idx,
byte b)
Changes the
byte value at the specified index. |
void |
setCharAt(int idx,
char c)
Changes the
char value at the specified index. |
java.lang.String |
stringValue()
Returns the wrapped value as a
String. |
java.lang.CharSequence |
subSequence(int start,
int end) |
java.lang.String |
toString() |
static OCamlString |
wrap(org.ocamljava.runtime.values.Value v)
Wraps the passed value.
|
static Wrapper<? extends OCamlString> |
wrapper()
Returns a wrapper for
OCamlString values. |
valuepublic static final Wrapper<OCamlString> WRAPPER
OCamlString values.public Wrapper<? extends OCamlString> getWrapper()
Value elements into
instances of the current class.getWrapper in class OCamlValueValue elements into
instances of the current classpublic Wrapper<? extends OCamlValue> getWrapper(int idx)
Value elements into
instances of the embedded type at given index.getWrapper in class OCamlValueidx - index of embedded typeValue elements into
instances of the embedded type at given index.public java.lang.String stringValue()
String.Stringpublic byte byteAt(int idx)
byte value at the specified index.idx - index of byte valuebyte value at the specified indexpublic char charAt(int idx)
charAt in interface java.lang.CharSequencepublic void setByteAt(int idx, byte b)
byte value at the specified index.idx - index of byte value to modifyb - new valuepublic void setCharAt(int idx, char c)
char value at the specified index.idx - index of char value to modifyc - new valuepublic int length()
length in interface java.lang.CharSequencepublic java.lang.CharSequence subSequence(int start, int end)
subSequence in interface java.lang.CharSequencepublic int hashCode()
hashCode in class OCamlValuepublic boolean equals(java.lang.Object obj)
equals in class OCamlValuepublic java.lang.String toString()
toString in interface java.lang.CharSequencetoString in class OCamlValuepublic static OCamlString create(java.lang.String v)
string value, and wraps it.v - value to wrapOCamlString instance wrapping the passed valuepublic static OCamlString wrap(org.ocamljava.runtime.values.Value v)
v - value to wrap - should not be nullOCamlString instance wrapping the passed valuepublic static Wrapper<? extends OCamlString> wrapper()
OCamlString values.OCamlString values