Package javax.jmdns.impl
Class JmDNSImpl.ServiceTypeEntry
- java.lang.Object
-
- java.util.AbstractMap<java.lang.String,java.lang.String>
-
- javax.jmdns.impl.JmDNSImpl.ServiceTypeEntry
-
- All Implemented Interfaces:
java.lang.Cloneable,java.util.Map<java.lang.String,java.lang.String>
- Enclosing class:
- JmDNSImpl
public static class JmDNSImpl.ServiceTypeEntry extends java.util.AbstractMap<java.lang.String,java.lang.String> implements java.lang.CloneableThis 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 Modifier and Type Class Description private static classJmDNSImpl.ServiceTypeEntry.SubTypeEntry
-
Constructor Summary
Constructors Constructor Description ServiceTypeEntry(java.lang.String type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(java.lang.String subtype)Adds the specified element to this set if it is not already present.JmDNSImpl.ServiceTypeEntryclone()booleancontains(java.lang.String subtype)Returnstrueif this set contains the specified element.java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>>entrySet()java.lang.StringgetType()The type associated with this entry.java.util.Iterator<java.lang.String>iterator()Returns an iterator over the elements in this set.java.lang.StringtoString()-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
-
-
-
-
Method Detail
-
getType
public java.lang.String getType()
The type associated with this entry.- Returns:
- the type
-
entrySet
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> entrySet()
- Specified by:
entrySetin interfacejava.util.Map<java.lang.String,java.lang.String>- Specified by:
entrySetin classjava.util.AbstractMap<java.lang.String,java.lang.String>
-
contains
public boolean contains(java.lang.String subtype)
Returnstrueif this set contains the specified element. More formally, returnstrueif and only if this set contains an elementesuch that(o==null ? e==null : o.equals(e)).- Parameters:
subtype- element whose presence in this set is to be tested- Returns:
trueif this set contains the specified element
-
add
public boolean add(java.lang.String subtype)
Adds the specified element to this set if it is not already present. More formally, adds the specified elementeto this set if this set contains no elemente2such that(e==null ? e2==null : e.equals(e2)). If this set already contains the element, the call leaves the set unchanged and returnsfalse.- Parameters:
subtype- element to be added to this set- Returns:
trueif this set did not already contain the specified element
-
iterator
public java.util.Iterator<java.lang.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:
clonein classjava.util.AbstractMap<java.lang.String,java.lang.String>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.util.AbstractMap<java.lang.String,java.lang.String>
-
-