verinec.netsim.util.tables
Class DNSTable

java.lang.Object
  extended by java.util.AbstractMap
      extended by verinec.netsim.util.tables.DNSTable
All Implemented Interfaces:
Map

public class DNSTable
extends AbstractMap

DNS Table extends AbstractMap.

Version:
$Revision: 47 $
Author:
Dominik Jungo

Nested Class Summary
protected  class DNSTable.Entry
          a entry with an address as key and addresses as associated value
private  class DNSTable.ReverseAddressComparator
          a comparator that compares addresses
 
Field Summary
private  HashSet entryset
           
 
Constructor Summary
DNSTable()
          Creates a new AddressTable
 
Method Summary
 Set entrySet()
           
 String getReverseAddress(byte[] value)
          Looks up the key(domain name) associated with the ip address
 Object put(Object arg0, Object arg1)
          Associates the specified set of ip adressed with the specified domain name in this map.
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

entryset

private HashSet entryset
Constructor Detail

DNSTable

public DNSTable()
Creates a new AddressTable

Method Detail

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map
Specified by:
entrySet in class AbstractMap
See Also:
Map.entrySet()

getReverseAddress

public String getReverseAddress(byte[] value)
Looks up the key(domain name) associated with the ip address

Parameters:
value - a value (Address)
Returns:
address associated to the value

put

public Object put(Object arg0,
                  Object arg1)
Associates the specified set of ip adressed with the specified domain name in this map. If the map previously contained a mapping for this key, the old value is replaced.

Specified by:
put in interface Map
Overrides:
put in class AbstractMap
Parameters:
arg0 - key (domain name) with which the specified value is to be associated.
arg1 - value (set of ip adresses) to be associated with the specified key.
Returns:
previous value associated with specified key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.)

Copyright © 2005 Verinec, DIUF