|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.jar.Attributes
public class Attributes
The Attributes class is used to store values for Manifest entries. Attributes keys are generally instances of Attributes.Name. Values associated with Attributes keys are of type String.
| Nested Class Summary | |
|---|---|
static class |
Attributes.Name
|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
protected Map<Object,Object> |
map
|
| Constructor Summary | |
|---|---|
Attributes()
Constructs an Attributes instance |
|
Attributes(Attributes attrib)
Constructs an Attributes instance obtaining keys and values from the parameter Attributes, attrib |
|
Attributes(int size)
Constructs an Attributes instance with initial capacity of size size |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all key/value pairs from this Attributes. |
Object |
clone()
Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver. |
boolean |
containsKey(Object key)
Determines whether this Attributes contains the specified key |
boolean |
containsValue(Object value)
Determines whether this Attributes contains the specified value |
Set<Map.Entry<Object,Object>> |
entrySet()
Returns a set containing MapEntry's for each of the key/value pairs contained in this Attributes. |
boolean |
equals(Object obj)
Determines if this Attributes and the parameter Attributes are equal. |
Object |
get(Object key)
Returns the value associated with the parameter key |
String |
getValue(Attributes.Name name)
Returns the value associated with the parameter Attributes.Name key. |
String |
getValue(String name)
Returns the String associated with the parameter name. |
int |
hashCode()
Returns the hashCode of this Attributes |
boolean |
isEmpty()
Determines whether this Attributes contains any keys |
Set<Object> |
keySet()
Returns a Set containing all the keys found in this Attributes. |
Object |
put(Object key,
Object value)
Store value in this Attributes and associate it with key. |
void |
putAll(Map<?,?> attrib)
Store all the key.value pairs in the argument in this Attributes. |
String |
putValue(String name,
String val)
Stores value val against key name in this Attributes |
Object |
remove(Object key)
Deletes the key/value pair with key key from this Attributes. |
int |
size()
Returns the number of key.value pairs associated with this Attributes. |
Collection<Object> |
values()
Returns a Collection of all the values present in this Attributes. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<Object,Object> map
| Constructor Detail |
|---|
public Attributes()
public Attributes(Attributes attrib)
attrib - The Attributes to obtain entries from.public Attributes(int size)
size - Initial size of this Attributes instance.| Method Detail |
|---|
public void clear()
clear in interface Map<Object,Object>Map.isEmpty(),
Map.size()public boolean containsKey(Object key)
containsKey in interface Map<Object,Object>key - The key to search for.
public boolean containsValue(Object value)
containsValue in interface Map<Object,Object>value - The value to search for.
public Set<Map.Entry<Object,Object>> entrySet()
entrySet in interface Map<Object,Object>public Object get(Object key)
get in interface Map<Object,Object>key - The key to search for.
public boolean isEmpty()
isEmpty in interface Map<Object,Object>Map.size()public Set<Object> keySet()
keySet in interface Map<Object,Object>
public Object put(Object key,
Object value)
put in interface Map<Object,Object>key - The key to associate with value.value - The value to store in this Attributes
ClassCastException - when key is not an Attributes.Name or value is not a
Stringpublic void putAll(Map<?,?> attrib)
putAll in interface Map<Object,Object>attrib - the associations to store (must be of type Attributes).public Object remove(Object key)
remove in interface Map<Object,Object>key - The key to remove
public int size()
size in interface Map<Object,Object>public Collection<Object> values()
values in interface Map<Object,Object>public Object clone()
ObjectClasses which wish to support cloning must specify that they implement the Cloneable interface, since the implementation checks for this.
clone in class Objectpublic int hashCode()
hashCode in interface Map<Object,Object>hashCode in class ObjectObject.equals(java.lang.Object)public boolean equals(Object obj)
equals in interface Map<Object,Object>equals in class Objectobj - Object the object to compare with this object.
Object.hashCode()public String getValue(Attributes.Name name)
name - The key to obtain the value for.
public String getValue(String name)
name - The key to obtain the value for.
public String putValue(String name,
String val)
name - The key to store against.val - The value to store in this Attributes
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||