Oracle Entitlements Server for Java API Reference

com.bea.security
Class AttributeValueEnumeration

java.lang.Object
  |
  +--com.bea.security.AttributeValueEnumeration

public class AttributeValueEnumeration
extends java.lang.Object
implements java.util.Enumeration

This class represents an ordered list of NameAttributeValues. It provides an enumeration interface to a list of NamAttributeValues as well as several methods to return differrent views of that list.

NOTE: This class is not thread safe since several threads that get elements from the enumeration can compete with each other.

Author:
Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.

Constructor Summary
AttributeValueEnumeration(java.util.Enumeration enm)
          Constructs an AttributeValueEnumeration from an enumeration of NameAttributeValues.
AttributeValueEnumeration(java.util.Vector vec)
          Construct an AttributeValueEnumeration from a Vector of NameAttributeValues.
 
Method Summary
 java.util.Vector getKeyVector()
          Gets a Vector that contains the keys of the contained NameAttributeValues.
 java.util.Vector getValueVector()
          Gets a Vector that contains the values of the contained NameAttributeValues
 boolean hasMoreElements()
          Determines if nextElement will return a valid element.
 java.lang.Object nextElement()
          Gets the next element in the enumeration.
 void reset()
          Resets the position of the enumeration to the beginning.
 java.util.Vector toVector()
          Gets this enumeration as a Vector of NameAttributeValues.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeValueEnumeration

public AttributeValueEnumeration(java.util.Vector vec)
Construct an AttributeValueEnumeration from a Vector of NameAttributeValues.

AttributeValueEnumeration

public AttributeValueEnumeration(java.util.Enumeration enm)
Constructs an AttributeValueEnumeration from an enumeration of NameAttributeValues.
Method Detail

reset

public void reset()
Resets the position of the enumeration to the beginning.


toVector

public java.util.Vector toVector()
Gets this enumeration as a Vector of NameAttributeValues.

Returns:
a Vector containing all the NameAttributeValues in this enumeration.

getKeyVector

public java.util.Vector getKeyVector()
Gets a Vector that contains the keys of the contained NameAttributeValues.

Returns:
a Vector containing the key names (Strings) of the NameAttributeValues contained in this enumeration.

getValueVector

public java.util.Vector getValueVector()
Gets a Vector that contains the values of the contained NameAttributeValues

Returns:
a Vector containing the values (Objects) of the NameAttributeValues contained in this enumeration

hasMoreElements

public boolean hasMoreElements()
Determines if nextElement will return a valid element.
Specified by:
hasMoreElements in interface java.util.Enumeration

Returns:
true if there is a valid element to fetch; otherwise, return false.

nextElement

public java.lang.Object nextElement()
Gets the next element in the enumeration.
Specified by:
nextElement in interface java.util.Enumeration

Returns:
the NameAttributeValue that is the next element in the enumeration.