|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Dictionary<K,V>
org.eclipse.osgi.framework.util.Headers<K,V>
public class Headers<K,V>
Headers classes. This class implements a Dictionary that has the following behavior:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
Headers(java.util.Dictionary<? extends K,? extends V> values)
Create a Headers dictionary from a Dictionary. |
|
Headers(int initialCapacity)
Create an empty Headers dictionary. |
|
| Method Summary | |
|---|---|
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Enumeration<V> |
elements()
Values. |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
|
V |
get(java.lang.Object key)
Support case-insensitivity for keys. |
boolean |
isEmpty()
Tests if this dictionary maps no keys to value. |
java.util.Enumeration<K> |
keys()
Case-preserved keys. |
java.util.Set<K> |
keySet()
|
static Headers<java.lang.String,java.lang.String> |
parseManifest(java.io.InputStream in)
|
V |
put(K key,
V value)
Always throws UnsupportedOperationException. |
void |
putAll(java.util.Map<? extends K,? extends V> c)
|
V |
remove(java.lang.Object key)
Always throws UnsupportedOperationException. |
V |
set(K key,
V value)
Set a header value. |
V |
set(K key,
V value,
boolean replace)
Set a header value or optionally replace it if it already exists. |
void |
setReadOnly()
|
int |
size()
Returns the number of entries (distinct keys) in this dictionary. |
java.lang.String |
toString()
|
java.util.Collection<V> |
values()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public Headers(int initialCapacity)
initialCapacity - The initial capacity of this Headers object.public Headers(java.util.Dictionary<? extends K,? extends V> values)
values - The initial dictionary for this Headers object.
java.lang.IllegalArgumentException - If a case-variant of the key is
in the dictionary parameter.| Method Detail |
|---|
public java.util.Enumeration<K> keys()
keys in class java.util.Dictionary<K,V>public java.util.Enumeration<V> elements()
elements in class java.util.Dictionary<K,V>public V get(java.lang.Object key)
get in interface java.util.Map<K,V>get in class java.util.Dictionary<K,V>key - name.
public V set(K key,
V value,
boolean replace)
key - Key name.value - Value of the key or null to remove key.replace - A value of true will allow a previous
value of the key to be replaced. A value of false
will cause an IllegalArgumentException to be thrown
if a previous value of the key exists.
java.lang.IllegalArgumentException - If a case-variant of the key is
already present.
public V set(K key,
V value)
key - Key name.value - Value of the key or null to remove key.
java.lang.IllegalArgumentException - If a case-variant of the key is
already present.public void setReadOnly()
public int size()
size in interface java.util.Map<K,V>size in class java.util.Dictionary<K,V>public boolean isEmpty()
isEmpty in interface java.util.Map<K,V>isEmpty in class java.util.Dictionary<K,V>true if this dictionary maps no keys to values;
false otherwise.
public V put(K key,
V value)
put in interface java.util.Map<K,V>put in class java.util.Dictionary<K,V>key - header name.value - header value.
java.lang.UnsupportedOperationExceptionpublic V remove(java.lang.Object key)
remove in interface java.util.Map<K,V>remove in class java.util.Dictionary<K,V>key - header name.
java.lang.UnsupportedOperationExceptionpublic java.lang.String toString()
toString in class java.lang.Object
public static Headers<java.lang.String,java.lang.String> parseManifest(java.io.InputStream in)
throws BundleException
BundleExceptionpublic void clear()
clear in interface java.util.Map<K,V>public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<K,V>public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<K,V>public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
entrySet in interface java.util.Map<K,V>public java.util.Set<K> keySet()
keySet in interface java.util.Map<K,V>public void putAll(java.util.Map<? extends K,? extends V> c)
putAll in interface java.util.Map<K,V>public java.util.Collection<V> values()
values in interface java.util.Map<K,V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||