Voyager ORB

com.objectspace.voyager.corba
Class Any

java.lang.Object
  |
  +--com.objectspace.voyager.corba.Any

public final class Any
extends java.lang.Object
implements java.io.Serializable

An instance of Any represents a single arbitrary CORBA value.

Version:
3.0
See Also:
Serialized Form

Constructor Summary
Any()
          Construct myself with no object or typecode.
Any(java.lang.Object value)
           
 
Method Summary
 boolean equals(java.lang.Object object)
          Return true if the specified object is an Any whose value equals my own.
 boolean getBoolean()
          Return my boolean value.
 char getChar()
          Return my char value.
 double getDouble()
          Return my double value.
 float getFloat()
          Return my float value.
 int getLong()
          Return my long value.
 java.lang.Object getObject()
          Return my Object value.
 byte getOctet()
          Return my byte value.
 short getShort()
          Return my short value.
 java.lang.String getString()
          Return my String value.
 int hashCode()
           
 void setBoolean(boolean value)
          Set my value to the specified boolean.
 void setChar(char value)
          Set my value to the specified char.
 void setDouble(double value)
          Set my value to the specified double.
 void setFloat(float value)
          Set my value to the specified float.
 void setLong(int value)
          Set my value to the specified int.
 void setLongLong(long value)
          Set my value to the specified long.
 void setObject(java.lang.Object value)
          Set my value to the specified Object.
 void setOctet(byte value)
          Set my value to the specified byte.
 void setShort(short value)
          Set my value to the specified short.
 void setString(java.lang.String value)
          Set my value to the specified String.
 java.lang.String toString()
          Return a string that describes me.
 TypeCode type()
          Return the typecode of my value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Any

public Any()
Construct myself with no object or typecode.

Any

public Any(java.lang.Object value)
Method Detail

toString

public java.lang.String toString()
Return a string that describes me.
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Return true if the specified object is an Any whose value equals my own.
Parameters:
object - The object to compare against.
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

type

public TypeCode type()
Return the typecode of my value.

setBoolean

public void setBoolean(boolean value)
Set my value to the specified boolean.
Parameters:
value - My new value.

setOctet

public void setOctet(byte value)
Set my value to the specified byte.
Parameters:
value - My new value.

setChar

public void setChar(char value)
Set my value to the specified char.
Parameters:
value - My new value.

setShort

public void setShort(short value)
Set my value to the specified short.
Parameters:
value - My new value.

setLong

public void setLong(int value)
Set my value to the specified int.
Parameters:
value - My new value.

setLongLong

public void setLongLong(long value)
Set my value to the specified long.
Parameters:
value - My new value.

setFloat

public void setFloat(float value)
Set my value to the specified float.
Parameters:
value - My new value.

setDouble

public void setDouble(double value)
Set my value to the specified double.
Parameters:
value - My new value.

setString

public void setString(java.lang.String value)
Set my value to the specified String.
Parameters:
value - My new value.

setObject

public void setObject(java.lang.Object value)
Set my value to the specified Object. Note that the object can be a Struct, Union, Enum, Exception, Any, TypeCode, or regular Object.
Parameters:
value - My new value.

getBoolean

public boolean getBoolean()
Return my boolean value.
Throws:
java.lang.ClassCastException - The reply was not a boolean.

getOctet

public byte getOctet()
Return my byte value.
Throws:
java.lang.ClassCastException - The reply was not a byte.

getChar

public char getChar()
Return my char value.
Throws:
java.lang.ClassCastException - The reply was not a char.

getShort

public short getShort()
Return my short value.
Throws:
java.lang.ClassCastException - The reply was not a short.

getLong

public int getLong()
Return my long value.
Throws:
java.lang.ClassCastException - The reply was not a long.

getFloat

public float getFloat()
Return my float value.
Throws:
java.lang.ClassCastException - The reply was not a float.

getDouble

public double getDouble()
Return my double value.
Throws:
java.lang.ClassCastException - The reply was not a double.

getString

public java.lang.String getString()
Return my String value.
Throws:
java.lang.ClassCastException - The reply was not a String.

getObject

public java.lang.Object getObject()
Return my Object value. Note that the object can be a Struct, Union, Enum, Exception, Any, TypeCode, or regular Object.

ObjectSpace Inc.

(c) Copyright 1997-1999 ObjectSpace, Inc.
14850 Quorum Drive, Suite 500
Dallas, Texas 75240