站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

MuCharacter (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.util
Class MuCharacter

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

public class MuCharacter
extends Object
implements Comparable, Cloneable, Serializable, Mutable

A mutable character class.

Version:
$Revision: 1.1 $
Author:
Jason Dillon
See Also:
Serialized Form

Constructor Summary
MuCharacter()
          Construct a new mutable character.
MuCharacter(char c)
          Construct a new mutable character.
MuCharacter(Object obj)
          Construct a new mutable character.
 
Method Summary
 char charValue()
          Return the char value of this mutable character.
 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(Object obj)
          Compares this object with the specified object for order.
 boolean equals(Object obj)
          Test the equality of this mutable character and another object.
 char get()
          Get the current value.
 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(Object obj)
          Set the value of this mutable character.
 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(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(Object obj)
Compares this object with the specified object for order.

Specified by:
compareTo in interface 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:
ClassCastException - Object is not a MuCharacter.

toString

public 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(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 Object clone()
Return a cloned copy of this mutable character.

Returns:
Cloned mutable character.

setValue

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

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

getValue

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

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


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.