| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | */ |
| | | |
| | | package org.opends.sdk; |
| | |
| | | { |
| | | Validator.ensureNotNull(attribute); |
| | | |
| | | if (!attribute.isEmpty()) |
| | | final AttributeDescription attributeDescription = attribute |
| | | .getAttributeDescription(); |
| | | final Attribute oldAttribute = attributes.get(attributeDescription); |
| | | if (oldAttribute != null) |
| | | { |
| | | final AttributeDescription attributeDescription = attribute |
| | | .getAttributeDescription(); |
| | | final Attribute oldAttribute = attributes.get(attributeDescription); |
| | | if (oldAttribute != null) |
| | | { |
| | | return oldAttribute.addAll(attribute, duplicateValues); |
| | | } |
| | | else |
| | | { |
| | | attributes.put(attributeDescription, attribute); |
| | | return true; |
| | | } |
| | | return oldAttribute.addAll(attribute, duplicateValues); |
| | | } |
| | | return false; |
| | | else |
| | | { |
| | | attributes.put(attributeDescription, attribute); |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | |