Package org.castor.mapping
Class BindingType
- java.lang.Object
-
- org.castor.mapping.BindingType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable
public final class BindingType extends java.lang.Object implements java.lang.Cloneable, java.lang.Comparable, java.io.Serializable
- Version:
- $Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
- Author:
- Ralf Joachim
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static BindingType
JDO
static BindingType
XML
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Clone only returns the one and only instance of this kind.int
compareTo(java.lang.Object other)
boolean
equals(java.lang.Object other)
Returns if the specified object and this are one and the same instance.int
hashCode()
Returns the hash code of this object.static java.util.Iterator
iterator()
protected java.lang.Object
readResolve()
Called during deserialization.java.lang.String
toString()
Returns the String representation of this kind.static BindingType
valueOf(java.lang.String kind)
-
-
-
Field Detail
-
JDO
public static final BindingType JDO
-
XML
public static final BindingType XML
-
-
Method Detail
-
valueOf
public static BindingType valueOf(java.lang.String kind)
-
iterator
public static java.util.Iterator iterator()
-
toString
public java.lang.String toString()
Returns the String representation of this kind.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String representation of this kind.
-
clone
public java.lang.Object clone()
Clone only returns the one and only instance of this kind.- Overrides:
clone
in classjava.lang.Object
- Returns:
- The original instance.
-
equals
public boolean equals(java.lang.Object other)
Returns if the specified object and this are one and the same instance.- Overrides:
equals
in classjava.lang.Object
- Parameters:
other
- Object to be compared with this instance.- Returns:
true
if other equals this elsefalse
.
-
hashCode
public int hashCode()
Returns the hash code of this object.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- Hash code of this object.
-
compareTo
public int compareTo(java.lang.Object other)
Compares_type
against_type
of the specified object. So this method is inconsistent withequals(java.lang.Object)
.- Specified by:
compareTo
in interfacejava.lang.Comparable
- Parameters:
other
- Object to be compared with this instance.- Returns:
- A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-
readResolve
protected java.lang.Object readResolve()
Called during deserialization.- Returns:
- The existing instance of the enum.
So you can use '==' like 'equals' even if you use a deserialized Enum.
-
-