org.apache.directory.server.dns.util
Interface EnumConverter<K>

Type Parameters:
K -
All Known Implementing Classes:
MessageType, OpCode, ProtocolType, RecordClass, RecordType, ResponseCode, ServiceType

public interface EnumConverter<K>

An interface that allows an Enum to be converted to another type, such as an integer or long. Useful in cases where the Java assigned ordinal just isn't reliable enough or is unable to represent the values we need.

Implementers should also implement (though there is no way of requiring it) a static method for taking the conversion the other way: public static Enum convert (K value);

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Method Summary
 K convert()
          Convert the enum to another type.
 

Method Detail

convert

K convert()
Convert the enum to another type.

Returns:
The other type.


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.