JmDNS 3.4.1

javax.jmdns.impl
Class JmDNSImpl.ServiceTypeEntry

java.lang.Object
  extended by java.util.AbstractMap<String,String>
      extended by javax.jmdns.impl.JmDNSImpl.ServiceTypeEntry
All Implemented Interfaces:
Cloneable, Map<String,String>
Enclosing class:
JmDNSImpl

public static class JmDNSImpl.ServiceTypeEntry
extends AbstractMap<String,String>
implements Cloneable

This is used to store type entries. The type is stored as a call variable and the map support the subtypes.

The key is the lowercase version as the value is the case preserved version.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
JmDNSImpl.ServiceTypeEntry(String type)
           
 
Method Summary
 boolean add(String subtype)
          Adds the specified element to this set if it is not already present.
 JmDNSImpl.ServiceTypeEntry clone()
           
 boolean contains(String subtype)
          Returns true if this set contains the specified element.
 Set<Map.Entry<String,String>> entrySet()
           
 String getType()
          The type associated with this entry.
 Iterator<String> iterator()
          Returns an iterator over the elements in this set.
 String toString()
           
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JmDNSImpl.ServiceTypeEntry

public JmDNSImpl.ServiceTypeEntry(String type)
Method Detail

getType

public String getType()
The type associated with this entry.

Returns:
the type

entrySet

public Set<Map.Entry<String,String>> entrySet()
Specified by:
entrySet in interface Map<String,String>
Specified by:
entrySet in class AbstractMap<String,String>

contains

public boolean contains(String subtype)
Returns true if this set contains the specified element. More formally, returns true if and only if this set contains an element e such that (o==null ? e==null : o.equals(e)).

Parameters:
subtype - element whose presence in this set is to be tested
Returns:
true if this set contains the specified element

add

public boolean add(String subtype)
Adds the specified element to this set if it is not already present. More formally, adds the specified element e to this set if this set contains no element e2 such that (e==null ? e2==null : e.equals(e2)). If this set already contains the element, the call leaves the set unchanged and returns false.

Parameters:
subtype - element to be added to this set
Returns:
true if this set did not already contain the specified element

iterator

public Iterator<String> iterator()
Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee).

Returns:
an iterator over the elements in this set

clone

public JmDNSImpl.ServiceTypeEntry clone()
Overrides:
clone in class AbstractMap<String,String>

toString

public String toString()
Overrides:
toString in class AbstractMap<String,String>

Last updated 2011-08-25 12:40

Copyright © 2002-2011 JmDNS. All Rights Reserved.