|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.quercus.env.Value
com.caucho.quercus.env.BooleanValue
public class BooleanValue
Represents a PHP boolean value.
| Field Summary | |
|---|---|
static BooleanValue |
FALSE
|
static BooleanValue |
TRUE
|
| Fields inherited from class com.caucho.quercus.env.Value |
|---|
L, NULL_ARGS, NULL_VALUE_ARRAY, SCALAR_V |
| Method Summary | |
|---|---|
Value |
append(Value index,
Value value)
Sets the array value, returning the new array, e.g. |
int |
cmp(Value rValue)
Returns true for equality |
static BooleanValue |
create(boolean value)
|
static Value |
create(java.lang.Boolean value)
|
boolean |
eq(Value rValue)
Returns true for equality |
boolean |
equals(java.lang.Object o)
Compare for equality. |
void |
generate(java.io.PrintWriter out)
Generates code to recreate the expression. |
void |
generateBoolean(java.io.PrintWriter out)
Generates code to recreate the expression. |
java.lang.String |
getType()
Returns the type. |
ValueType |
getValueType()
Returns the ValueType. |
int |
hashCode()
Returns the hash code |
boolean |
isBoolean()
Returns true for a BooleanValue |
boolean |
isEmpty()
Returns true if the value is empty |
boolean |
isScalar()
Returns true for a scalar |
void |
jsonEncode(Env env,
StringValue sb)
Encodes the value in JSON. |
int |
length()
Return the length as a string. |
void |
print(Env env)
Prints the value. |
void |
serialize(Env env,
java.lang.StringBuilder sb)
Serializes the value. |
Value |
toAutoArray()
Converts to an array if null. |
Value |
toAutoObject(Env env)
Converts to an object if null. |
boolean |
toBoolean()
Converts to a boolean. |
int |
toBooleanMarshalCost()
Cost to convert to a boolean |
java.lang.String |
toDebugString()
|
double |
toDouble()
Converts to a double. |
java.lang.Object |
toJavaObject()
Converts to a java object. |
Value |
toKey()
Converts to a key. |
long |
toLong()
Converts to a long. |
java.lang.Object |
toObject()
Converts to an object. |
java.lang.String |
toString()
Converts to a string. |
StringValue |
toStringBuilder(Env env)
Converts to a string builder |
void |
varDumpImpl(Env env,
WriteStream out,
int depth,
java.util.IdentityHashMap<Value,java.lang.String> valueSet)
|
void |
varExport(java.lang.StringBuilder sb)
Exports the value. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final BooleanValue TRUE
public static final BooleanValue FALSE
| Method Detail |
|---|
public static BooleanValue create(boolean value)
public static Value create(java.lang.Boolean value)
public java.lang.String getType()
getType in class Valuepublic ValueType getValueType()
getValueType in class Valuepublic boolean isBoolean()
isBoolean in class Valuepublic boolean isScalar()
public final boolean toBoolean()
toBoolean in class Valuepublic boolean isEmpty()
isEmpty in class Valuepublic int toBooleanMarshalCost()
toBooleanMarshalCost in class Valuepublic long toLong()
toLong in class Valuepublic double toDouble()
toDouble in class Valuepublic java.lang.String toString()
toString in class java.lang.Objectpublic StringValue toStringBuilder(Env env)
toStringBuilder in class Valuepublic java.lang.Object toObject()
public java.lang.Object toJavaObject()
toJavaObject in class Valuepublic Value toAutoArray()
toAutoArray in class Valuepublic Value toAutoObject(Env env)
toAutoObject in class Value
public Value append(Value index,
Value value)
append in class Valuepublic Value toKey()
toKey in class Valuepublic boolean eq(Value rValue)
eq in class Valuepublic int cmp(Value rValue)
cmp in class Valuepublic int length()
length in class Valuepublic void print(Env env)
print in class Valueenv -
public void generate(java.io.PrintWriter out)
throws java.io.IOException
generate in class Valueout - the writer to the Java source code.
java.io.IOException
public void generateBoolean(java.io.PrintWriter out)
throws java.io.IOException
out - the writer to the Java source code.
java.io.IOException
public void serialize(Env env,
java.lang.StringBuilder sb)
serialize in class Value
public void jsonEncode(Env env,
StringValue sb)
jsonEncode in class Valuepublic void varExport(java.lang.StringBuilder sb)
varExport in class Valuepublic int hashCode()
hashCode in class Valuepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toDebugString()
toDebugString in class Value
public void varDumpImpl(Env env,
WriteStream out,
int depth,
java.util.IdentityHashMap<Value,java.lang.String> valueSet)
throws java.io.IOException
varDumpImpl in class Valuejava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||