ch.ethz.iks.r_osgi.types
Class BoxedPrimitive

java.lang.Object
  extended by ch.ethz.iks.r_osgi.types.BoxedPrimitive
All Implemented Interfaces:
java.io.Serializable

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

Boxes a primitive value for remote method calls that have primitive type arguments.

Since:
0.4
Author:
Jan S. Rellermeyer, ETH Zurich.
See Also:
Serialized Form

Constructor Summary
BoxedPrimitive(boolean b)
          box a boolean value.
BoxedPrimitive(byte b)
          box a byte value.
BoxedPrimitive(char c)
          box a char value.
BoxedPrimitive(double d)
          box a double value.
BoxedPrimitive(float f)
          box a float value.
BoxedPrimitive(int i)
          box an int value.
BoxedPrimitive(long l)
          box a long value.
BoxedPrimitive(java.lang.Object o)
          create from object.
BoxedPrimitive(short s)
          box a short value.
 
Method Summary
 boolean equals(java.lang.Object o)
          check for equality.
 java.lang.Object getBoxed()
          get the boxed value.
 int hashCode()
          get the hash code.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BoxedPrimitive

public BoxedPrimitive(java.lang.Object o)
create from object.

Parameters:
o - the object.

BoxedPrimitive

public BoxedPrimitive(int i)
box an int value.

Parameters:
i - the int value.

BoxedPrimitive

public BoxedPrimitive(boolean b)
box a boolean value.

Parameters:
b - the boolean value.

BoxedPrimitive

public BoxedPrimitive(long l)
box a long value.

Parameters:
l - the long value.

BoxedPrimitive

public BoxedPrimitive(char c)
box a char value.

Parameters:
c - the char value.

BoxedPrimitive

public BoxedPrimitive(double d)
box a double value.

Parameters:
d - the double value.

BoxedPrimitive

public BoxedPrimitive(float f)
box a float value.

Parameters:
f - the float value.

BoxedPrimitive

public BoxedPrimitive(short s)
box a short value.

Parameters:
s - the short value.

BoxedPrimitive

public BoxedPrimitive(byte b)
box a byte value.

Parameters:
s - the short value.
Method Detail

getBoxed

public java.lang.Object getBoxed()
get the boxed value.

Returns:
the boxing object.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
check for equality.

Overrides:
equals in class java.lang.Object
Parameters:
o - the other object.
Returns:
true, iff equal.

hashCode

public int hashCode()
get the hash code.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code.


Copyright © 2009 IKS, ETH Zurich. All Rights Reserved.