Module io.netty5.common
Package io.netty5.util
Class AbstractConstant<T extends AbstractConstant<T>>
- java.lang.Object
-
- io.netty5.util.AbstractConstant<T>
-
- All Implemented Interfaces:
Constant<T>
,Comparable<T>
- Direct Known Subclasses:
AttributeKey
,ChannelOption
,SslContextOption
public abstract class AbstractConstant<T extends AbstractConstant<T>> extends Object implements Constant<T>
Base implementation ofConstant
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractConstant(int id, String name)
Creates a new instance.
-
-
-
Constructor Detail
-
AbstractConstant
protected AbstractConstant(int id, String name)
Creates a new instance.
-
-
Method Detail
-
name
public final String 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>>
-
compareTo
public final int compareTo(T o)
- Specified by:
compareTo
in interfaceComparable<T extends AbstractConstant<T>>
-
-