Class AbstractConstant<T extends AbstractConstant<T>>
java.lang.Object
com.swiftmq.impl.mqtt.v311.netty.util.AbstractConstant<T>
- All Implemented Interfaces:
Constant<T>
,Comparable<T>
public abstract class AbstractConstant<T extends AbstractConstant<T>>
extends Object
implements Constant<T>
Base implementation of
Constant
.-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractConstant
(int id, String name) Creates a new instance. -
Method Summary
-
Constructor Details
-
AbstractConstant
Creates a new instance.
-
-
Method Details
-
name
Description copied from interface:Constant
Returns the name of thisConstant
.- Specified by:
name
in interfaceConstant<T extends AbstractConstant<T>>
-
id
public final int id()Description copied from interface:Constant
Returns the unique number assigned to thisConstant
.- Specified by:
id
in interfaceConstant<T extends AbstractConstant<T>>
-
toString
-
hashCode
public final int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T extends AbstractConstant<T>>
-