org.jboss.util
Class MuCharacter

java.lang.Object
  extended byorg.jboss.util.MuCharacter
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, Mutable (src) , java.io.Serializable

public class MuCharacter
extends java.lang.Object
implements java.lang.Comparable, java.lang.Cloneable, java.io.Serializable, Mutable (src)

A mutable character class.

See Also:
Serialized Form

Constructor Summary
MuCharacter()
          Construct a new mutable character.
MuCharacter(char c)
          Construct a new mutable character.
MuCharacter(java.lang.Object obj)
          Construct a new mutable character.
 
Method Summary
 char charValue()
          Return the char value of this mutable character.
 java.lang.Object clone()
          Return a cloned copy of this mutable character.
 int compareTo(char other)
          Compares this object with the specified long for order.
 int compareTo(java.lang.Object obj)
          Compares this object with the specified object for order.
 boolean equals(java.lang.Object obj)
          Test the equality of this mutable character and another object.
 char get()
          Get the current value.
 java.lang.Object getValue()
          Return the char value of this mutable character.
 int hashCode()
          Get the hash code of this mutable character.
 char set(char c)
          Set the value.
 void setValue(java.lang.Object obj)
          Set the value of this mutable character.
 java.lang.String toString()
          Convert this mutable character to a string.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MuCharacter

public MuCharacter()
Construct a new mutable character.


MuCharacter

public MuCharacter(char c)
Construct a new mutable character.

Parameters:
c - char value.

MuCharacter

public MuCharacter(java.lang.Object obj)
Construct a new mutable character.

Parameters:
obj - Object to convert to a char.
Method Detail

set

public char set(char c)
Set the value.

Parameters:
c - char value.
Returns:
The previous value.

get

public char get()
Get the current value.

Returns:
The current value.

charValue

public char charValue()
Return the char value of this mutable character.

Returns:
char value.

compareTo

public int compareTo(char other)
Compares this object with the specified long for order.

Parameters:
other - Value to compare with.
Returns:
A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

compareTo

public int compareTo(java.lang.Object obj)
Compares this object with the specified object for order.

Specified by:
compareTo in interface java.lang.Comparable
Returns:
A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
java.lang.ClassCastException - Object is not a MuCharacter.

toString

public java.lang.String toString()
Convert this mutable character to a string.

Returns:
String value.

hashCode

public int hashCode()
Get the hash code of this mutable character.

Returns:
Hash code.

equals

public boolean equals(java.lang.Object obj)
Test the equality of this mutable character and another object.

Parameters:
obj - Qbject to test equality with.
Returns:
True if object is equal.

clone

public java.lang.Object clone()
Return a cloned copy of this mutable character.

Returns:
Cloned mutable character.

setValue

public void setValue(java.lang.Object obj)
Set the value of this mutable character.

Specified by:
setValue in interface Mutable (src)
Parameters:
obj - Object to convert to a char.
Throws:
NotCoercibleException (src) - Can not convert to char.

getValue

public java.lang.Object getValue()
Return the char value of this mutable character.

Specified by:
getValue in interface Mutable (src)
Returns:
java.lang.Character value.