Package org.igniterealtime.jbosh
Class AbstractAttr<T extends Comparable>
java.lang.Object
org.igniterealtime.jbosh.AbstractAttr<T>
- Type Parameters:
T
- type of the extension object
- All Implemented Interfaces:
Comparable
- Direct Known Subclasses:
AbstractIntegerAttr
,AttrAccept
,AttrAck
,AttrCharsets
,AttrSessionID
,AttrVersion
Abstract base class for creating BOSH attribute classes. Concrete
implementations of this class will naturally inherit the underlying
type's behavior for
equals()
, hashCode()
,
toString()
, and compareTo()
, allowing for the easy
creation of objects which extend existing trivial types. This was done
to comply with the prefactoring rule declaring, "when you are being
abstract, be abstract all the way".-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractAttr
(T aValue) Creates a new encapsulated object instance. -
Method Summary
-
Field Details
-
value
Captured value.
-
-
Constructor Details
-
AbstractAttr
Creates a new encapsulated object instance.- Parameters:
aValue
- encapsulated getValue
-
-
Method Details
-
getValue
Gets the encapsulated data value.- Returns:
- data value
-
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T extends Comparable>
- Parameters:
otherObj
- object to compare to- Returns:
- -1, 0, or 1
-