FileDocCategorySizeDatePackage
RoleUnresolvedList.javaAPI DocJava SE 5 API6348Fri Aug 26 14:57:38 BST 2005javax.management.relation

RoleUnresolvedList

public class RoleUnresolvedList extends ArrayList
A RoleUnresolvedList represents a list of RoleUnresolved objects, representing roles not retrieved from a relation due to a problem encountered when trying to access (read or write to roles).
since
1.5

Fields Summary
private static final long
serialVersionUID
Constructors Summary
public RoleUnresolvedList()
Constructs an empty RoleUnresolvedList.


    //
    // Constructors
    //

             
      
	super();
	return;
    
public RoleUnresolvedList(int theInitialCapacity)
Constructs an empty RoleUnresolvedList with the initial capacity specified.

param
theInitialCapacity initial capacity

	super(theInitialCapacity);
	return;
    
public RoleUnresolvedList(List theList)
Constructs a RoleUnresolvedList containing the elements of the List specified, in the order in which they are returned by the List's iterator. The RoleUnresolvedList instance has an initial capacity of 110% of the size of the List specified.

param
theList list of RoleUnresolved objects
exception
IllegalArgumentException if:

- null parameter

or

- an element in the List is not a RoleUnresolved


	if (theList == null) {
	    String excMsg = "Invalid parameter";
	    throw new IllegalArgumentException(excMsg);
	}

	int i = 0;
	for (Iterator eltIter = theList.iterator();
	     eltIter.hasNext();) {
	    Object currElt = eltIter.next();
	    if (!(currElt instanceof RoleUnresolved)) {
		StringBuffer excMsgStrB = new StringBuffer();
		String excMsg = "An element is not a RoleUnresolved at index ";
		excMsgStrB.append(excMsg);
		excMsgStrB.append(i);
		throw new IllegalArgumentException(excMsgStrB.toString());
	    }
	    i++;
	    super.add(currElt);
	}
	return;
    
Methods Summary
public voidadd(javax.management.relation.RoleUnresolved theRoleUnres)
Adds the RoleUnresolved specified as the last element of the list.

param
theRoleUnres - the unresolved role to be added.
exception
IllegalArgumentException if the unresolved role is null.


	if (theRoleUnres == null) {
	    String excMsg = "Invalid parameter";
	    throw new IllegalArgumentException(excMsg);
	}
	super.add(theRoleUnres);
	return;
    
public voidadd(int index, javax.management.relation.RoleUnresolved theRoleUnres)
Inserts the unresolved role specified as an element at the position specified. Elements with an index greater than or equal to the current position are shifted up.

param
index - The position in the list where the new RoleUnresolved object is to be inserted.
param
theRoleUnres - The RoleUnresolved object to be inserted.
exception
IllegalArgumentException if the unresolved role is null.
exception
IndexOutOfBoundsException if index is out of range (index < 0 || index > size()).


	if (theRoleUnres == null) {
	    String excMsg = "Invalid parameter";
	    throw new IllegalArgumentException(excMsg);
	}

	super.add(index, theRoleUnres);
	return;
    
public booleanaddAll(javax.management.relation.RoleUnresolvedList theRoleUnresolvedList)
Appends all the elements in the RoleUnresolvedList specified to the end of the list, in the order in which they are returned by the Iterator of the RoleUnresolvedList specified.

param
theRoleUnresolvedList - Elements to be inserted into the list (can be null).
return
true if this list changed as a result of the call.
exception
IndexOutOfBoundsException if accessing with an index outside of the list.


	if (theRoleUnresolvedList == null) {
	    return true;
	}

	return (super.addAll(theRoleUnresolvedList));
    
public booleanaddAll(int index, javax.management.relation.RoleUnresolvedList theRoleUnresolvedList)
Inserts all of the elements in the RoleUnresolvedList specified into this list, starting at the specified position, in the order in which they are returned by the Iterator of the RoleUnresolvedList specified.

param
index - Position at which to insert the first element from the RoleUnresolvedList specified.
param
theRoleUnresolvedList - Elements to be inserted into the list.
return
true if this list changed as a result of the call.
exception
IllegalArgumentException if the role is null.
exception
IndexOutOfBoundsException if index is out of range (index < 0 || index > size()).


	if (theRoleUnresolvedList == null) {
	    String excMsg = "Invalid parameter";
	    throw new IllegalArgumentException(excMsg);
	}

	return (super.addAll(index, theRoleUnresolvedList));
    
public voidset(int index, javax.management.relation.RoleUnresolved theRoleUnres)
Sets the element at the position specified to be the unresolved role specified. The previous element at that position is discarded.

param
index - The position specified.
param
theRoleUnres - The value to which the unresolved role element should be set.
exception
IllegalArgumentException if the unresolved role is null.
exception
IndexOutOfBoundsException if index is out of range (index < 0 || index >= size()).


	if (theRoleUnres == null) {
	    String excMsg = "Invalid parameter";
	    throw new IllegalArgumentException(excMsg);
	}

	super.set(index, theRoleUnres);
	return;