public static void iterateAttributeValues ( Attribute attribute , AttributeValueCallbackHandler callbackHandler ) { Assert . notNull ( attribute , "Attribute must not be null" ) ; Assert . notNull ( callbackHandler , "callbackHandler must not be null" ) ; if ( attribute instanceof Iterable ) { int i = 0 ; for ( Object obj : ( Iterable ) attribute ) { handleAttributeValue ( attribute . getID ( ) , obj , i , callbackHandler ) ; i ++ ; } } else { for ( int i = 0 ; i < attribute . size ( ) ; i ++ ) { try { handleAttributeValue ( attribute . getID ( ) , attribute . get ( i ) , i , callbackHandler ) ; } catch ( javax . naming . NamingException e ) { throw convertLdapException ( e ) ; } } } }
Iterate through all the values of the specified Attribute calling back to the specified callbackHandler .