|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--ilog.server.jcomp.MvValue
This class encapsulates the value of the runtime attributes attached to representation objects. The Rogue Wave Server internal protocol uses this class to transmit attribute values between an object server and an application component.
Conversion: Conversion functions take the following form:Type asType(boolean direct, Type default)
If the requested type is exactly the same as that of the stored value, the
value is returned. Otherwise, default is returned.
| Inner Class Summary | |
class |
MvValue.Visitor
|
| Constructor Summary | |
MvValue()
|
|
MvValue(MvValue v)
|
|
MvValue(java.lang.Object v)
|
|
MvValue(java.lang.Object v,
int k)
|
|
MvValue(java.lang.Object v,
MvDataType t)
|
|
| Method Summary | |
Any |
asAny()
Equivalent to asAny(false). |
Any |
asAny(boolean direct)
Equivalent to asAny(direct, null). |
Any |
asAny(boolean direct,
Any def)
|
boolean |
asBoolean()
Equivalent to asBoolean(false). |
boolean |
asBoolean(boolean direct)
Equivalent to asBoolean(direct,false). |
boolean |
asBoolean(boolean direct,
boolean def)
|
char |
asChar()
Equivalent to asChar(false). |
char |
asChar(boolean direct)
Equivalent to asChar(direct,'\0'). |
char |
asChar(boolean direct,
char def)
|
double |
asDouble()
Equivalent to asDouble(false). |
double |
asDouble(boolean direct)
Equivalent to asDouble(direct, (double) 0.0 ). |
double |
asDouble(boolean direct,
double defaultVal)
|
MvFile |
asFile()
Equivalent to asFile(false). |
MvFile |
asFile(boolean direct)
Equivalent to asFile(direct, null). |
MvFile |
asFile(boolean direct,
MvFile def)
|
float |
asFloat()
Equivalent to asFloat(false). |
float |
asFloat(boolean direct)
Equivalent to asFloat(direct, (float) 0.0). |
float |
asFloat(boolean dir,
float defl)
|
HRef |
asHRef()
Equivalent to asHRef(false). |
HRef |
asHRef(boolean direct)
Equivalent to asHRef(direct, null). |
HRef |
asHRef(boolean direct,
HRef def)
|
int |
asInt()
Equivalent to asInt(false). |
int |
asInt(boolean direct)
Equivalent to (int) asLong(direct). |
long |
asLong()
Equivalent to asLong(false). |
long |
asLong(boolean direct)
Equivalent to asLong(direct, 0). |
long |
asLong(boolean direct,
long def)
|
MvRef |
asRef()
Equivalent to asRef(false). |
MvRef |
asRef(boolean direct)
Equivalent to asRef(direct, null). |
MvRef |
asRef(boolean direct,
MvRef def)
|
java.lang.String |
asString()
Equivalent to asString(false). |
java.lang.String |
asString(boolean direct)
Equivalent to asString(direct, ""). |
java.lang.String |
asString(boolean direct,
java.lang.String def)
|
MvUserType |
asUserValue()
Equivalent to asUserValue(null). |
MvUserType |
asUserValue(java.lang.Class type)
Equivalent to asUserValue(type, null). |
MvUserType |
asUserValue(java.lang.Class type,
MvUserType def)
|
int |
getKind()
|
java.lang.Object |
getValue()
|
void |
set(MvValue v)
|
MvMessage |
stream(MvMessage msg)
|
java.lang.String |
stringValue(MvComponent c)
|
java.lang.String |
toString()
|
java.lang.String |
toString(boolean full)
|
static MvValue |
Unstream(MvMessage msg)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public MvValue(java.lang.Object v,
MvDataType t)
v - The value.
public MvValue(java.lang.Object v,
int k)
public MvValue(java.lang.Object v)
public MvValue()
public MvValue(MvValue v)
| Method Detail |
public final java.lang.Object getValue()
public void set(MvValue v)
public final int getKind()
MvDataType
public static MvValue Unstream(MvMessage msg)
throws ilog.server.jcomp.MvUserType.UnstreamException
public MvMessage stream(MvMessage msg)
stream in interface ilog.server.jcomp.Streamablepublic final boolean asBoolean(boolean direct)
asBoolean(direct,false).public final boolean asBoolean()
asBoolean(false).public final char asChar(boolean direct)
asChar(direct,'\0').public final char asChar()
asChar(false).public final int asInt(boolean direct)
(int) asLong(direct).public final int asInt()
asInt(false).public final long asLong(boolean direct)
asLong(direct, 0).public final long asLong()
asLong(false).public final float asFloat(boolean direct)
asFloat(direct, (float) 0.0).public final float asFloat()
asFloat(false).public final double asDouble(boolean direct)
asDouble(direct, (double) 0.0 ).public final double asDouble()
asDouble(false).public final java.lang.String asString(boolean direct)
asString(direct, "").public final java.lang.String asString()
asString(false).public final Any asAny(boolean direct)
asAny(direct, null).public final Any asAny()
asAny(false).public final HRef asHRef(boolean direct)
asHRef(direct, null).public final HRef asHRef()
asHRef(false).public final MvRef asRef(boolean direct)
asRef(direct, null).public final MvRef asRef()
asRef(false).public final MvUserType asUserValue(java.lang.Class type)
asUserValue(type, null).public final MvUserType asUserValue()
asUserValue(null).public final MvFile asFile(boolean direct)
asFile(direct, null).public final MvFile asFile()
asFile(false).
public boolean asBoolean(boolean direct,
boolean def)
direct - If true, an exact type match is required.def - The default result.asUserValue.asBoolean(def).
char),
true if different from 0),
false otherwise.
true if the value is not
null, false otherwise.
public char asChar(boolean direct,
char def)
direct - If true, an exact type match is required.def - The default result.asUserValue.asChar(def).
char),
true if different from 0),
false otherwise.
true if the value is not
null, false otherwise.
public long asLong(boolean direct,
long def)
direct - If true, an exact type match is required.def - The default result.asUserValue.asLong(def).
char), the
value converted to long.
1 if true,
0 if false.
String, try to parse it as a
long.
public float asFloat(boolean dir,
float defl)
direct - If true, an exact type match is required.def - The default result.asUserValue.asFloat(def).
char), the
value converted to float.
1.0 if true,
0.0 if false.
String, try to parse it as a
float.
public double asDouble(boolean direct,
double defaultVal)
direct - If true, an exact type match is required.def - The default result.asUserValue.asDouble(def).
char), the
value converted to double.
1.0 if true,
0.0 if false.
String, try to parse it as a
double.
public java.lang.String asString(boolean direct,
java.lang.String def)
direct - If true, an exact type match is required.def - The default result.asUserValue.asString(def).
String.
public Any asAny(boolean direct,
Any def)
direct - If true, an exact type match is required.def - The default result.asUserValue.asAny(def).
public HRef asHRef(boolean direct,
HRef def)
direct - If true, an exact type match is required.def - The default result.
public MvRef asRef(boolean direct,
MvRef def)
direct - If true, an exact type match is required.def - The default result.asUserValue.asRef(def).
public MvUserType asUserValue(java.lang.Class type,
MvUserType def)
type - The requested type.def - The default result.asUserValue.asValue(type,def).
public MvFile asFile(boolean direct,
MvFile def)
direct - If true, an exact type match is required.def - The default result.public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(boolean full)
public java.lang.String stringValue(MvComponent c)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||