java.lang.Object | |
↳ | java.util.jar.Attributes |
The
Attributes
class is used to store values for manifest entries.
Attribute keys are generally instances of
Attributes.Name
. Values
associated with attribute keys are of type
String
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Attributes.Name | The name part of the name/value pairs constituting an attribute as defined by the specification of the JAR manifest. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
map |
The
Attributes
as name/value pairs.
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Constructs an
Attributes
instance.
|
||||||||||
|
Constructs an
Attributes
instance obtaining keys and values from
the parameter
attrib
.
|
||||||||||
|
Constructs an
Attributes
instance with initial capacity of size
size
.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Removes all key/value pairs from this
Attributes
.
|
||||||||||
|
Creates and returns a copy of this
Object
.
|
||||||||||
|
Determines whether this
Attributes
contains the specified key.
|
||||||||||
|
Determines whether this
Attributes
contains the specified value.
|
||||||||||
|
Returns a set containing map entries for each of the key/value pair
contained in this
Attributes
.
|
||||||||||
|
Determines if this
Attributes
and the parameter
Attributes
are equal.
|
||||||||||
|
Returns the value associated with the parameter key.
|
||||||||||
|
Returns the string associated with the parameter name.
|
||||||||||
|
Returns the value associated with the parameter
Attributes.Name
key.
|
||||||||||
|
Returns the hash code of this
Attributes
.
|
||||||||||
|
Determines whether this
Attributes
contains any keys.
|
||||||||||
|
Returns a
Set
containing all the keys found in this
Attributes
.
|
||||||||||
|
Stores key/value pairs in this
Attributes
.
|
||||||||||
|
Stores all the key/value pairs in the argument in this
Attributes
.
|
||||||||||
|
Stores the value
value
associated with the key
name
in this
Attributes
.
|
||||||||||
|
Deletes the key/value pair with key
key
from this
Attributes
.
|
||||||||||
|
Returns the number of key/value pairs associated with this
Attributes
.
|
||||||||||
|
Returns a collection of all the values present in this
Attributes
.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
|||||||||||
From interface
java.util.Map
|
The
Attributes
as name/value pairs. Maps the attribute names (as
Attributes.Name
) of a JAR file manifest to arbitrary values. The
attribute names thus are obtained from the
Manifest
for
convenience.
Constructs an
Attributes
instance obtaining keys and values from
the parameter
attrib
.
attrib | The attributes to obtain entries from. |
---|
Constructs an
Attributes
instance with initial capacity of size
size
.
size |
Initial size of this
Attributes
instance.
|
---|
Creates and returns a copy of this
Object
. The default
implementation returns a so-called "shallow" copy: It creates a new
instance of the same class and then copies the field values (including
object references) from this instance to the new instance. A "deep" copy,
in contrast, would also recursively clone nested objects. A subclass that
needs to implement this kind of cloning should call
super.clone()
to create the new instance and then create deep copies of the nested,
mutable objects.
Determines whether this
Attributes
contains the specified key.
key | The key to search for. |
---|
true
if the key is found,
false
otherwise.
Determines whether this
Attributes
contains the specified value.
value | the value to search for. |
---|
true
if the value is found,
false
otherwise.
Returns a set containing map entries for each of the key/value pair
contained in this
Attributes
.
Determines if this
Attributes
and the parameter
Attributes
are equal. Two
Attributes
instances are equal if they
contain the same keys and values.
obj |
the object with which this
Attributes
is compared.
|
---|
true
if the
Attributes
are equal,
false
otherwise.
Returns the value associated with the parameter key.
key | the key to search for. |
---|
null
if key does not
exist.
Returns the string associated with the parameter name.
name | the key to obtain the value for. |
---|
null
if name is not a
valid key.
Returns the value associated with the parameter
Attributes.Name
key.
name | the key to obtain the value for. |
---|
String
associated with name, or
null
if name
is not a valid key.
Returns the hash code of this
Attributes
.
Determines whether this
Attributes
contains any keys.
true
if one or more keys exist,
false
otherwise.
Returns a
Set
containing all the keys found in this
Attributes
.
Set
of all keys.
Stores key/value pairs in this
Attributes
.
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
String
.
|
---|
Stores all the key/value pairs in the argument in this
Attributes
.
attrib |
the associations to store (must be of type
Attributes
).
|
---|
Stores the value
value
associated with the key
name
in this
Attributes
.
Deletes the key/value pair with key
key
from this
Attributes
.
key | the key to remove. |
---|
null
if not
present.
Returns the number of key/value pairs associated with this
Attributes
.
Attributes
.
Returns a collection of all the values present in this
Attributes
.