org.opends.server.types
Class AttributeValueIterable

java.lang.Object
  extended by org.opends.server.types.AttributeValueIterable
All Implemented Interfaces:
java.lang.Iterable<AttributeValue>

@PublicAPI(stability=VOLATILE,
           mayInstantiate=false,
           mayExtend=false,
           mayInvoke=true)
public final class AttributeValueIterable
extends java.lang.Object
implements java.lang.Iterable<AttributeValue>

An iterable read-only view of of a set of attribute values returned from methods such as Entry.getAttribute(AttributeType).

Using instances of this class it is possible to filter out attribute values which do not have the correct options set. This is achieved without having to duplicate the set of attributes.


Constructor Summary
AttributeValueIterable(java.lang.Iterable<Attribute> attributes)
          Create a new attribute value iterable object.
AttributeValueIterable(java.lang.Iterable<Attribute> attributes, java.util.HashSet<java.lang.String> options)
          Create a new attribute value iterable object.
 
Method Summary
 java.util.Iterator<AttributeValue> iterator()
          Retrieves an iterator that can be used to cursor through the set of attribute values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeValueIterable

public AttributeValueIterable(java.lang.Iterable<Attribute> attributes)
Create a new attribute value iterable object.

Parameters:
attributes - The set of attributes having the same type. Can be null.

AttributeValueIterable

public AttributeValueIterable(java.lang.Iterable<Attribute> attributes,
                              java.util.HashSet<java.lang.String> options)
Create a new attribute value iterable object.

Parameters:
attributes - The set of attributes having the same type. Can be null.
options - The set of options which all values must contain, or null if no options are required.
Method Detail

iterator

public java.util.Iterator<AttributeValue> iterator()
Retrieves an iterator that can be used to cursor through the set of attribute values.

Specified by:
iterator in interface java.lang.Iterable<AttributeValue>
Returns:
An iterator that can be used to cursor through the set of attribute values.