org.nhindirect.dns
Class DNSError<T>

java.lang.Object
  extended by org.nhindirect.dns.DNSError<T>
Type Parameters:
T - The error type. Typically a long or integer describing an error code.

public class DNSError<T>
extends Object

Container for a DNS error code.

Since:
1.0
Author:
Greg Meyer

Constructor Summary
DNSError(T error)
          Constructs a new DNSError.
 
Method Summary
 T getError()
          Gets the internal error.
static
<T> DNSError<T>
newError(T error)
          Creates a new DNSError with an internal error code.
 String toString()
          
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DNSError

public DNSError(T error)
Constructs a new DNSError.

Parameters:
error - The error describing the error condition.
Method Detail

newError

public static <T> DNSError<T> newError(T error)
Creates a new DNSError with an internal error code.

Type Parameters:
T - The error Type. Typically a long or integer describing an error code.
Parameters:
error - The error describing the error condition.
Returns:

getError

public T getError()
Gets the internal error. The error is typically a long or integer describing an error code.

Returns:
The internal error.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2010-2015 The Direct Project. All Rights Reserved.