Microsoft SDK for Java

put

This method of the Attributes class contains the following signatures:

put(Attribute v)
put(Name name, Object value)

put(Attribute v)

Adds an Attribute Name and value pair to the collection, or replaces the value for the named Attribute if it is already present in the collection.

Syntax

public Object put(Attribute v);

Return Value

Returns null if the Attribute was added to the collection; returns the previous value of the Attribute if the value was replaced.

Parameters

v The Attribute to add. If the Attribute is already present in the collection, its current value is replaced with that in the value parameter.

put(Name name, Object value)

Adds an Attribute Name and value pair to the collection, or replaces the value for the named Attribute if it is already present in the collection.

Syntax

public Object put(Name name, Object value);

Return Value

Returns null if the Attribute was added to the collection; returns the previous value of the Attribute if the value was replaced.

Parameters

name The Name of the Attribute to add. If the Attribute is already present in the collection, its current value is replaced with that in the value parameter.
value The object to associate with the Attribute.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.