|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.BitHelper
com.tangosol.util.ExternalizableHelper
com.tangosol.run.xml.SimpleValue
public class SimpleValue
A simple implementation of the XmlValue interface. Protected methods are provided to support inheriting classes.
| Field Summary |
|---|
| Fields inherited from interface com.tangosol.run.xml.XmlValue |
|---|
TYPE_BINARY, TYPE_BOOLEAN, TYPE_DATE, TYPE_DATETIME, TYPE_DECIMAL, TYPE_DOUBLE, TYPE_INT, TYPE_LONG, TYPE_STRING, TYPE_TIME |
| Constructor Summary | |
|---|---|
SimpleValue()Construct an empty SimpleValue. |
|
SimpleValue(java.lang.Object oValue)Construct a SimpleValue. |
|
SimpleValue(java.lang.Object oValue, boolean fAttribute)Construct a SimpleValue. |
|
SimpleValue(java.lang.Object oValue, boolean fAttribute, boolean fReadOnly)Construct a SimpleValue. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()Creates and returns a copy of this SimpleValue. |
protected java.lang.Object |
convert(java.lang.Object o, int nType)Convert the passed Object to the specified type. |
protected java.lang.Object |
ensureType(int nType)Change the type of the internal representation of the XmlValue. |
boolean |
equals(java.lang.Object o)Compare this XML value with another XML value for equality. |
Binary |
getBinary()Get the value as binary. |
Binary |
getBinary(Binary binDefault)Get the value as binary. |
boolean |
getBoolean()Get the value as a boolean. |
boolean |
getBoolean(boolean fDefault)Get the value as a boolean. |
java.sql.Date |
getDate()Get the value as a Date. |
java.sql.Date |
getDate(java.sql.Date dtDefault)Get the value as a Date. |
java.sql.Timestamp |
getDateTime()Get the value as a Timestamp. |
java.sql.Timestamp |
getDateTime(java.sql.Timestamp dtDefault)Get the value as a Timestamp. |
java.math.BigDecimal |
getDecimal()Get the value as a decimal. |
java.math.BigDecimal |
getDecimal(java.math.BigDecimal decDefault)Get the value as a decimal. |
double |
getDouble()Get the value as a double. |
double |
getDouble(double dflDefault)Get the value as a double. |
int |
getInt()Get the value as an int. |
int |
getInt(int nDefault)Get the value as an int. |
protected java.lang.Object |
getInternalValue()Get the internal value of this XmlValue. |
long |
getLong()Get the value as a long. |
long |
getLong(long lDefault)Get the value as a long. |
XmlElement |
getParent()Get the parent element of this element. |
java.lang.String |
getString()Get the value as a String. |
java.lang.String |
getString(java.lang.String sDefault)Get the value as a String. |
java.sql.Time |
getTime()Get the value as a Time. |
java.sql.Time |
getTime(java.sql.Time dtDefault)Get the value as a Time. |
java.lang.Object |
getValue()Get the value as an Object. |
int |
hashCode()Provide a hash value for this XML value. |
boolean |
isAttribute()Determine if this value is an element attribute. |
boolean |
isContent()Determine if this value is an element's content. |
boolean |
isEmpty()Determine if the value is empty. |
boolean |
isMutable()Determine if this value can be modified. |
void |
readExternal(java.io.DataInput in)Restore the contents of this object by loading the object's state from the passed DataInput object. |
void |
readExternal(PofReader in)Restore the contents of a user type instance by reading its state using the specified PofReader object. |
protected void |
setAttribute(boolean fAttribute)Specify that this value is an element attribute. |
void |
setBinary(Binary binVal)Set the binary value. |
void |
setBoolean(boolean fVal)Set the boolean value. |
void |
setDate(java.sql.Date dtVal)Set the Date value. |
void |
setDateTime(java.sql.Timestamp dtVal)Set the Timestamp value. |
void |
setDecimal(java.math.BigDecimal decVal)Set the dcimal value. |
void |
setDouble(double dflVal)Set the double value. |
void |
setInt(int nVal)Set the int value. |
protected void |
setInternalValue(java.lang.Object oValue)Update the internal representation of the XmlValue. |
void |
setLong(long lVal)Set the long value. |
protected void |
setMutable(boolean fMutable)Specify whether this value can be modified or not. |
void |
setParent(XmlElement element)Set the parent element of this value. |
void |
setString(java.lang.String sVal)Set the String value. |
void |
setTime(java.sql.Time dtVal)Set the Time value. |
java.lang.String |
toString()Format the XML value into a String in a display format. |
void |
writeExternal(java.io.DataOutput out)Save the contents of this object by storing the object's state into the passed DataOutput object. |
void |
writeExternal(PofWriter out)Save the contents of a POF user type instance by writing its state using the specified PofWriter object. |
void |
writeValue(java.io.PrintWriter out, boolean fPretty)Write the value as it will appear in XML. |
| Methods inherited from class com.tangosol.util.BitHelper |
|---|
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString, toBytes, toBytes, toBytes, toBytes, toInt, toInt, toLong, toLong |
| Constructor Detail |
|---|
public SimpleValue()
public SimpleValue(java.lang.Object oValue)
oValue - the initial value for this SimpleValuejava.lang.IllegalArgumentException - if the String value is illegal
public SimpleValue(java.lang.Object oValue,
boolean fAttribute)
oValue - the initial value for this SimpleValuefAttribute - true if this SimpleValue is an element attribute value; false if an element's content's valuejava.lang.IllegalArgumentException - if the String value is illegal
public SimpleValue(java.lang.Object oValue,
boolean fAttribute,
boolean fReadOnly)
oValue - the initial value for this SimpleValuefAttribute - true if this SimpleValue is an element attribute value; false if an element's content's valuefReadOnly - true if this SimpleValue is intended to be read- only once the constructor has finishedjava.lang.IllegalArgumentException - if the String value is illegal| Method Detail |
|---|
public boolean getBoolean()
getBoolean in interface XmlValuepublic boolean getBoolean(boolean fDefault)
getBoolean in interface XmlValuefDefault - the default return value if the internal value can not be translated into a legal value of type booleanpublic void setBoolean(boolean fVal)
setBoolean in interface XmlValuefVal - a new value of type booleanpublic int getInt()
getInt in interface XmlValuepublic int getInt(int nDefault)
getInt in interface XmlValuenDefault - the default return value if the internal value can not be translated into a legal value of type intpublic void setInt(int nVal)
setInt in interface XmlValuenVal - a new value of type intpublic long getLong()
getLong in interface XmlValuepublic long getLong(long lDefault)
getLong in interface XmlValuelDefault - the default return value if the internal value can not be translated into a legal value of type longpublic void setLong(long lVal)
setLong in interface XmlValuelVal - a new value of type longpublic double getDouble()
getDouble in interface XmlValuepublic double getDouble(double dflDefault)
getDouble in interface XmlValuedflDefault - the default return value if the internal value can not be translated into a legal value of type doublepublic void setDouble(double dflVal)
setDouble in interface XmlValuedflVal - a new value of type doublepublic java.math.BigDecimal getDecimal()
getDecimal in interface XmlValuepublic java.math.BigDecimal getDecimal(java.math.BigDecimal decDefault)
getDecimal in interface XmlValuedecDefault - the default return value if the internal value can not be translated into a legal value of type decimalpublic void setDecimal(java.math.BigDecimal decVal)
setDecimal in interface XmlValuedecVal - a new value of type BigDecimalpublic java.lang.String getString()
getString in interface XmlValuepublic java.lang.String getString(java.lang.String sDefault)
getString in interface XmlValuesDefault - the default return value if the internal value can not be translated into a legal value of type Stringpublic void setString(java.lang.String sVal)
setString in interface XmlValuesVal - a new value of type Stringjava.lang.IllegalArgumentException - if the String value is nullpublic Binary getBinary()
getBinary in interface XmlValuepublic Binary getBinary(Binary binDefault)
getBinary in interface XmlValuebinDefault - the default return value if the internal value can not be translated into a legal value of type Binarypublic void setBinary(Binary binVal)
setBinary in interface XmlValuebinVal - a new value of type Binaryjava.lang.IllegalArgumentException - if the binary value is nullpublic java.sql.Date getDate()
getDate in interface XmlValuepublic java.sql.Date getDate(java.sql.Date dtDefault)
getDate in interface XmlValuedtDefault - the default return value if the internal value can not be translated into a legal value of type Datepublic void setDate(java.sql.Date dtVal)
setDate in interface XmlValuedtVal - a new value of type Datepublic java.sql.Time getTime()
getTime in interface XmlValuepublic java.sql.Time getTime(java.sql.Time dtDefault)
getTime in interface XmlValuedtDefault - the default return value if the internal value can not be translated into a legal value of type Timepublic void setTime(java.sql.Time dtVal)
setTime in interface XmlValuedtVal - a new value of type Timepublic java.sql.Timestamp getDateTime()
getDateTime in interface XmlValuepublic java.sql.Timestamp getDateTime(java.sql.Timestamp dtDefault)
getDateTime in interface XmlValuedtDefault - the default return value if the internal value can not be translated into a legal value of type Timestamppublic void setDateTime(java.sql.Timestamp dtVal)
setDateTime in interface XmlValuedtVal - a new value of type Timestamppublic java.lang.Object getValue()
getValue in interface XmlValuepublic XmlElement getParent()
getParent in interface XmlValuepublic void setParent(XmlElement element)
setParent in interface XmlValueelement - the parent elementjava.lang.IllegalArgumentException - thrown if the specified parent is nulljava.lang.IllegalStateException - throw if the parent is already setpublic boolean isEmpty()
isEmpty in interface XmlValuepublic boolean isAttribute()
isAttribute in interface XmlValuepublic boolean isContent()
isContent in interface XmlValuepublic boolean isMutable()
isMutable in interface XmlValue
public void writeValue(java.io.PrintWriter out,
boolean fPretty)
writeValue in interface XmlValueout - a PrintWriter object to use to write tofPretty - true to specify that the output is intended to be as human readable as possible
public void readExternal(java.io.DataInput in)
throws java.io.IOException
readExternal in interface ExternalizableLitein - the DataInput stream to read data from in order to restore the state of this objectjava.io.IOException - if an I/O exception occursjava.io.NotActiveException - if the object is not in its initial state, and therefore cannot be deserialized into
public void writeExternal(java.io.DataOutput out)
throws java.io.IOException
writeExternal in interface ExternalizableLiteout - the DataOutput stream to write the state of this object tojava.io.IOException - if an I/O exception occurs
public void readExternal(PofReader in)
throws java.io.IOException
readExternal in interface PortableObjectin - the PofReader from which to read the object's statejava.io.IOException - if an I/O error occurs
public void writeExternal(PofWriter out)
throws java.io.IOException
writeExternal in interface PortableObjectout - the PofWriter to which to write the object's statejava.io.IOException - if an I/O error occursprotected java.lang.Object getInternalValue()
protected void setInternalValue(java.lang.Object oValue)
oValue - the new value for this SimpleValue objectjava.lang.UnsupportedOperationException - if this XmlValue is not mutableprotected java.lang.Object ensureType(int nType)
nType - the enumerated type to convert to
protected java.lang.Object convert(java.lang.Object o,
int nType)
o - the object valuenType - the enumerated type to convert toprotected void setAttribute(boolean fAttribute)
fAttribute - true if this value is an element attribute, false if this value is an element's contentprotected void setMutable(boolean fMutable)
fMutable - pass true to allow this value to be modified, otherwise false to indicate that this value is read-onlypublic java.lang.String toString()
toString in interface XmlValuepublic int hashCode()
hashCode in interface XmlValuepublic boolean equals(java.lang.Object o)
equals in interface XmlValuepublic java.lang.Object clone()
clone in interface XmlValue
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||