public class StringBuilderValue extends BinaryValue
Modifier and Type | Field and Description |
---|---|
static StringBuilderValue |
EMPTY |
IS_DOUBLE, IS_LONG, IS_STRING, MIN_LENGTH
L, NULL_ARGS, NULL_VALUE_ARRAY
Constructor and Description |
---|
StringBuilderValue() |
StringBuilderValue(byte ch) |
StringBuilderValue(byte[] buffer) |
StringBuilderValue(byte[] buffer,
int offset,
int length) |
StringBuilderValue(byte[] s,
Value v1) |
StringBuilderValue(char ch) |
StringBuilderValue(char[] s) |
StringBuilderValue(char[] buffer,
int length)
Creates a new StringBuilderValue with the buffer without copying.
|
StringBuilderValue(char[] buffer,
int offset,
int length) |
StringBuilderValue(char[] s,
Value v1) |
StringBuilderValue(int capacity) |
StringBuilderValue(int capacity,
boolean isAbsolute) |
StringBuilderValue(java.lang.String s) |
StringBuilderValue(StringBuilderValue v) |
StringBuilderValue(Value v1) |
StringBuilderValue(Value v1,
Value v2) |
StringBuilderValue(Value v1,
Value v2,
Value v3) |
Modifier and Type | Method and Description |
---|---|
StringValue |
append(boolean v)
Append a Java boolean to the value.
|
StringValue |
append(byte[] buf)
Append a double to the value.
|
StringValue |
append(byte[] buf,
int offset,
int length)
Append a buffer to the value.
|
StringValue |
append(char ch)
Append a Java char to the value.
|
StringValue |
append(char[] buf)
Append a Java buffer to the value.
|
StringValue |
append(char[] buf,
int offset,
int length)
Append a Java buffer to the value.
|
StringValue |
append(java.lang.CharSequence buf,
int head,
int tail)
Append a Java buffer to the value.
|
StringValue |
append(double v)
Append a Java double to the value.
|
StringValue |
append(long v)
Append a Java long to the value.
|
StringValue |
append(java.io.Reader reader,
long length)
Append from a read stream
|
StringValue |
append(java.lang.String s)
Append a Java string to the value.
|
StringValue |
append(StringBuilderValue sb,
int head,
int tail)
Append a Java buffer to the value.
|
StringValue |
append(java.lang.String s,
int start,
int end)
Append a Java string to the value.
|
StringValue |
append(Value v)
Append a Java value to the value.
|
Value |
append(Value index,
Value value)
Sets the array ref.
|
StringValue |
appendByte(int v)
Append a Java byte to the value without conversions.
|
StringValue |
appendBytes(byte[] bytes,
int offset,
int end)
Append Java bytes to the value without conversions.
|
StringValue |
appendBytes(java.lang.String s)
Append a bytes to the value.
|
StringValue |
appendTo(BinaryBuilderValue bb)
Append to a string builder.
|
StringValue |
appendTo(LargeStringBuilderValue bb)
Append to a string builder.
|
StringValue |
appendTo(StringBuilderValue bb)
Append to a string builder.
|
StringValue |
appendTo(UnicodeBuilderValue bb)
Append to a string builder.
|
StringValue |
appendUnicode(char[] buf)
Append a Java buffer to the value.
|
StringValue |
appendUnicode(char[] buf,
int offset,
int length)
Append a Java buffer to the value.
|
StringValue |
appendUnicode(Value v)
Append a Java value to the value.
|
StringValue |
appendUnicode(Value v1,
Value v2)
Append a Java value to the value.
|
StringValue |
appendUtf8(byte[] buf,
int offset,
int length)
Append a buffer to the value.
|
char |
charAt(int index)
Returns the character at a particular location
|
Value |
charValueAt(long index)
Returns the character at an index
|
StringValue |
copyStringBuilder()
Converts to a string builder
|
static StringValue |
create(byte value)
Creates the string.
|
static StringValue |
create(char value)
Creates the string.
|
static Value |
create(java.lang.String value)
Creates a PHP string from a Java String.
|
StringBuilderValue |
createStringBuilder()
Creates a string builder of the same type.
|
StringBuilderValue |
createStringBuilder(byte[] buffer,
int offset,
int length)
Creates a string builder of the same type.
|
StringBuilderValue |
createStringBuilder(int length)
Creates a string builder of the same type.
|
void |
ensureAppendCapacity(int newCapacity)
Ensure enough append capacity.
|
protected void |
ensureCapacity(int newCapacity) |
boolean |
eq(Value rValue)
Returns true for equality
|
boolean |
eql(Value o)
Returns true for equality
|
boolean |
equals(java.lang.Object o)
Test for equality
|
boolean |
equalsIgnoreCase(java.lang.Object o)
Test for equality
|
void |
generate(java.io.PrintWriter out)
Generates code to recreate the expression.
|
Value |
get(Value key)
Returns the character at an index
|
byte[] |
getBuffer()
Returns the buffer.
|
int |
getBufferLength()
Returns the current capacity.
|
long |
getCrc32Value()
Calculates CRC32 value.
|
int |
getHashCode() |
java.io.OutputStream |
getOutputStream()
Returns an OutputStream.
|
java.lang.String |
getType()
Returns the type.
|
java.lang.String |
getValue()
Returns the value.
|
ValueType |
getValueType()
Returns the ValueType.
|
static ValueType |
getValueType(byte[] buffer,
int offset,
int len) |
int |
hashCode()
Returns the hash code.
|
int |
hashCodeCaseInsensitive()
Returns the hash code.
|
int |
indexOf(char match)
Returns the first index of the match string, starting from the head.
|
int |
indexOf(char match,
int head)
Returns the last index of the match string, starting from the head.
|
int |
indexOf(java.lang.CharSequence match,
int head)
Returns the first index of the match string, starting from the head.
|
boolean |
isEmpty()
Returns true if the value is empty.
|
boolean |
isScalar()
Returns true for a scalar
|
boolean |
isset(Value indexV)
Return true if the array value is set
|
int |
length()
Returns the length of the string.
|
void |
print(Env env)
Prints the value.
|
void |
print(Env env,
WriteStream out)
Prints the value.
|
Value |
put(Value index,
Value value)
Sets the array ref.
|
boolean |
regionMatches(int offset,
char[] mBuffer,
int mOffset,
int mLength)
Returns true if the region matches
|
boolean |
regionMatchesIgnoreCase(int offset,
char[] mBuffer,
int mOffset,
int mLength)
Returns true if the region matches
|
void |
serialize(Env env,
java.lang.StringBuilder sb)
Serializes the value.
|
Value |
setCharValueAt(long indexL,
Value value)
sets the character at an index
|
void |
setLength(int offset)
Sets the length.
|
java.lang.String |
stringSubstring(int start,
int end)
Returns a subsequence
|
java.lang.CharSequence |
subSequence(int start,
int end)
Returns a subsequence
|
StringValue |
toBinaryValue(Env env)
Converts to a BinaryValue.
|
StringValue |
toBinaryValue(java.lang.String charset)
Converts to a BinaryValue in desired charset.
|
boolean |
toBoolean()
Converts to a boolean.
|
byte[] |
toBytes()
Converts to a byte array, with no consideration of character encoding.
|
java.lang.String |
toDebugString() |
double |
toDouble()
Converts to a double.
|
static double |
toDouble(byte[] buffer,
int offset,
int len) |
java.io.InputStream |
toInputStream()
Convert to an input stream.
|
java.lang.Object |
toJavaObject()
Converts to an object.
|
Value |
toKey()
Converts to a key.
|
long |
toLong()
Converts to a long.
|
StringValue |
toLowerCase(java.util.Locale locale)
Convert to lower case.
|
java.lang.String |
toString()
Converts to a string.
|
StringValue |
toStringBuilder()
Converts to a string builder
|
StringValue |
toStringBuilder(Env env)
Converts to a string builder
|
StringValue |
toStringBuilder(Env env,
StringValue value)
Converts to a string builder
|
StringValue |
toStringBuilder(Env env,
Value value)
Converts to a string builder
|
StringValue |
toUnicodeValue()
Converts to a UnicodeValue.
|
StringValue |
toUnicodeValue(Env env)
Converts to a UnicodeValue.
|
StringValue |
toUnicodeValue(Env env,
java.lang.String charset)
Converts to a UnicodeValue in desired charset.
|
StringValue |
toUpperCase()
Convert to lower case.
|
void |
varDumpImpl(Env env,
WriteStream out,
int depth,
java.util.IdentityHashMap<Value,java.lang.String> valueSet) |
void |
write(byte[] buf,
int offset,
int length)
Appends buffer to the ByteAppendable.
|
void |
write(int ch)
Appends value to the ByteAppendable.
|
void |
writeTo(java.io.OutputStream os)
Writes to a stream
|
toBinaryValueMarshalCost
add, append, append, append, append, append, appendBytes, appendBytes, appendRead, appendRead, appendReadAll, appendReadAll, appendReadAll, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUtf8, bitAnd, bitOr, bitXor, cmp, cmpString, convertToUnicode, create, create, endsWith, equalsString, equalsStringIgnoreCase, getArg, getChars, getRawCharArray, increment, indexOf, intern, isCallable, isDoubleConvertible, isLongConvertible, isNumber, isNumeric, isString, jsonEncode, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, putThisFieldArray, regionMatches, startsWith, sub, substring, substring, toAutoArray, toAutoObject, toByteMarshalCost, toCallable, toCharArray, toCharArrayMarshalCost, toCharMarshalCost, toDouble, toDoubleMarshalCost, toFloatMarshalCost, toIntegerMarshalCost, toLong, toLongMarshalCost, toLowerCase, toReader, toShortMarshalCost, toSimpleReader, toString, toStringMarshalCost, toStringValue, toStringValue, toStringValueMarshalCost, toUnicode, toUpperCase, valuesToArray, varExportImpl
abs, add, addOne, call, call, call, call, call, call, call, callCopy, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callRef, callRef, callRef, callRef, callRef, callRef, callRef, checkPrivate, checkProtected, clone, containsKey, copy, copy, copy, copyArrayItem, copyReturn, copySaveFunArg, copyTree, current, div, div, end, eqValue, findFunction, findQuercusClass, geq, get, getArgTail, getArray, getArray, getBaseIterator, getCallableName, getCalledClass, getClassName, getCount, getCountRecursive, getDirty, getField, getFieldArg, getFieldArgRef, getFieldArray, getFieldObject, getFieldVar, getIterator, getKeyArray, getKeyIterator, getObject, getObject, getObjectHash, getQuercusClass, getRef, getResourceType, getSize, getStaticFieldValue, getStaticFieldVar, getThisField, getThisFieldArg, getThisFieldArgRef, getThisFieldArray, getThisFieldObject, getThisFieldVar, getValueArray, getValueIterator, getVar, gt, hasCurrent, initField, initField, initField, initIncompleteField, isA, isA, isArray, isBinary, isBoolean, isDefault, isDouble, isEmpty, isFieldExists, isFieldInit, isLong, isNull, isNumberConvertible, isObject, isResource, isset, issetField, issetThisField, isUnicode, isVar, key, keyExists, leq, lshift, lt, mod, mul, mul, neg, next, nextIndex, pop, pos, postdecr, postincr, postincr, predecr, preincr, preincr, prev, printDepth, printJavaChar, printJavaString, printR, printRImpl, put, put, putArray, putField, putField, putField, putObject, putThisField, putThisField, putVar, remove, reset, rshift, serialize, set, setFieldInit, setJavaObject, setStaticFieldRef, shuffle, sub_rev, sub, subOne, toArgRef, toArray, toArrayValue, toBigDecimal, toBigInteger, toBinaryValue, toBooleanMarshalCost, toByteArrayMarshalCost, toChar, toDouble, toDouble, toDouble, toDouble, toDoubleValue, toException, toInt, toInternString, toJavaBoolean, toJavaByte, toJavaCalendar, toJavaCharacter, toJavaCollection, toJavaDate, toJavaDouble, toJavaEnum, toJavaFloat, toJavaInteger, toJavaList, toJavaLong, toJavaMap, toJavaObject, toJavaObjectMarshalCost, toJavaObjectNotNull, toJavaShort, toJavaString, toJavaURL, toLocalRef, toLocalThis, toLocalValue, toLocalValueReadOnly, toLocalVar, toLocalVarDeclAsRef, toLong, toLong, toLong, toLong, toLongValue, toObject, toRef, toRefValue, toString, toUnicodeValueMarshalCost, toValue, toVar, unsetArray, unsetField, unsetThisArray, unsetThisField, unsetThisPrivateField, varDump, varExport
public static final StringBuilderValue EMPTY
public StringBuilderValue()
public StringBuilderValue(int capacity)
public StringBuilderValue(int capacity, boolean isAbsolute)
public StringBuilderValue(byte[] buffer, int offset, int length)
public StringBuilderValue(char[] buffer, int offset, int length)
public StringBuilderValue(char[] buffer, int length)
public StringBuilderValue(byte[] buffer)
public StringBuilderValue(char ch)
public StringBuilderValue(byte ch)
public StringBuilderValue(java.lang.String s)
public StringBuilderValue(char[] s)
public StringBuilderValue(char[] s, Value v1)
public StringBuilderValue(byte[] s, Value v1)
public StringBuilderValue(Value v1)
public StringBuilderValue(StringBuilderValue v)
public static StringValue create(byte value)
public static StringValue create(char value)
public static Value create(java.lang.String value)
public final java.lang.String getValue()
public java.lang.String getType()
getType
in class StringValue
public ValueType getValueType()
getValueType
in class StringValue
public static final ValueType getValueType(byte[] buffer, int offset, int len)
public final boolean isScalar()
isScalar
in class StringValue
public final boolean toBoolean()
toBoolean
in class StringValue
public double toDouble()
toDouble
in class StringValue
public static final double toDouble(byte[] buffer, int offset, int len)
public final java.io.InputStream toInputStream()
toInputStream
in class StringValue
public java.lang.String toString()
toString
in interface java.lang.CharSequence
toString
in class java.lang.Object
public final StringValue toBinaryValue(Env env)
toBinaryValue
in class Value
public final StringValue toBinaryValue(java.lang.String charset)
toBinaryValue
in class Value
public StringValue toUnicodeValue()
toUnicodeValue
in class Value
public StringValue toUnicodeValue(Env env)
toUnicodeValue
in class Value
public StringValue toUnicodeValue(Env env, java.lang.String charset)
toUnicodeValue
in class StringValue
public final java.lang.Object toJavaObject()
toJavaObject
in class StringValue
public final boolean isEmpty()
isEmpty
in class StringValue
public final void writeTo(java.io.OutputStream os)
writeTo
in class StringValue
public StringValue appendTo(StringBuilderValue bb)
public StringValue appendTo(UnicodeBuilderValue bb)
appendTo
in class StringValue
public StringValue appendTo(LargeStringBuilderValue bb)
public StringValue appendTo(BinaryBuilderValue bb)
public Value toKey()
toKey
in class StringValue
public final byte[] toBytes()
toBytes
in class StringValue
public final Value get(Value key)
get
in class StringValue
public Value append(Value index, Value value)
append
in class StringValue
public final int length()
length
in interface java.lang.CharSequence
length
in class StringValue
public final char charAt(int index)
charAt
in interface java.lang.CharSequence
charAt
in class StringValue
public Value charValueAt(long index)
charValueAt
in class StringValue
public Value setCharValueAt(long indexL, Value value)
setCharValueAt
in class StringValue
public int indexOf(char match)
indexOf
in class StringValue
public int indexOf(char match, int head)
indexOf
in class StringValue
public java.lang.CharSequence subSequence(int start, int end)
subSequence
in interface java.lang.CharSequence
subSequence
in class StringValue
public java.lang.String stringSubstring(int start, int end)
stringSubstring
in class StringValue
public StringValue toLowerCase(java.util.Locale locale)
toLowerCase
in class StringValue
public StringValue toUpperCase()
toUpperCase
in class StringValue
public boolean regionMatches(int offset, char[] mBuffer, int mOffset, int mLength)
regionMatches
in class StringValue
public boolean regionMatchesIgnoreCase(int offset, char[] mBuffer, int mOffset, int mLength)
regionMatchesIgnoreCase
in class StringValue
public StringBuilderValue createStringBuilder()
createStringBuilder
in class StringValue
public StringBuilderValue createStringBuilder(int length)
createStringBuilder
in class StringValue
public StringBuilderValue createStringBuilder(byte[] buffer, int offset, int length)
public StringValue copyStringBuilder()
copyStringBuilder
in class Value
public StringValue toStringBuilder()
toStringBuilder
in class Value
public StringValue toStringBuilder(Env env)
toStringBuilder
in class StringValue
public StringValue toStringBuilder(Env env, Value value)
toStringBuilder
in class Value
public StringValue toStringBuilder(Env env, StringValue value)
toStringBuilder
in class Value
public final StringValue append(java.lang.String s)
append
in class StringValue
public final StringValue append(java.lang.String s, int start, int end)
append
in class StringValue
public final StringValue append(char ch)
append
in class StringValue
public final void write(int ch)
ByteAppendable
write
in interface ByteAppendable
write
in class StringValue
public final StringValue append(char[] buf, int offset, int length)
append
in class StringValue
public final StringValue append(char[] buf)
append
in class StringValue
public StringValue appendUnicode(char[] buf)
appendUnicode
in class StringValue
public StringValue appendUnicode(char[] buf, int offset, int length)
appendUnicode
in class StringValue
public final StringValue append(java.lang.CharSequence buf, int head, int tail)
append
in class StringValue
public StringValue append(StringBuilderValue sb, int head, int tail)
append
in class StringValue
public final StringValue append(Value v)
append
in class StringValue
public final int indexOf(java.lang.CharSequence match, int head)
indexOf
in class StringValue
public StringValue appendUnicode(Value v)
appendUnicode
in class StringValue
public StringValue appendUnicode(Value v1, Value v2)
appendUnicode
in class StringValue
public final StringValue append(byte[] buf, int offset, int length)
append
in class StringValue
public final void write(byte[] buf, int offset, int length)
StringValue
write
in interface ByteAppendable
write
in class StringValue
public final StringValue append(byte[] buf)
append
in class StringValue
public final StringValue appendUtf8(byte[] buf, int offset, int length)
appendUtf8
in class StringValue
public final StringValue appendByte(int v)
appendByte
in class StringValue
public final StringValue append(boolean v)
append
in class StringValue
public StringValue append(long v)
append
in class StringValue
public StringValue append(double v)
append
in class StringValue
public StringValue appendBytes(java.lang.String s)
appendBytes
in class StringValue
public final StringValue appendBytes(byte[] bytes, int offset, int end)
appendBytes
in class StringValue
public StringValue append(java.io.Reader reader, long length) throws java.io.IOException
StringValue
append
in class StringValue
java.io.IOException
public final byte[] getBuffer()
public final void setLength(int offset)
setLength
in class StringValue
public final int getBufferLength()
public boolean isset(Value indexV)
isset
in class StringValue
public void print(Env env)
public void print(Env env, WriteStream out)
public void serialize(Env env, java.lang.StringBuilder sb)
serialize
in class StringValue
public java.lang.String toDebugString()
toDebugString
in class StringValue
public void varDumpImpl(Env env, WriteStream out, int depth, java.util.IdentityHashMap<Value,java.lang.String> valueSet) throws java.io.IOException
varDumpImpl
in class StringValue
java.io.IOException
public java.io.OutputStream getOutputStream()
StringValue
getOutputStream
in class StringValue
public long getCrc32Value()
getCrc32Value
in class StringValue
public void ensureAppendCapacity(int newCapacity)
StringValue
ensureAppendCapacity
in class StringValue
protected void ensureCapacity(int newCapacity)
public int hashCode()
hashCode
in class StringValue
public int hashCodeCaseInsensitive()
hashCodeCaseInsensitive
in class StringValue
public int getHashCode()
getHashCode
in class Value
public boolean eq(Value rValue)
eq
in class StringValue
public boolean equals(java.lang.Object o)
StringValue
equals
in class StringValue
public boolean equalsIgnoreCase(java.lang.Object o)
equalsIgnoreCase
in class StringValue
public void generate(java.io.PrintWriter out) throws java.io.IOException
generate
in class StringValue
out
- the writer to the Java source code.java.io.IOException