org.mindswap.xmlparser.xml.util
Class XMLResourceList

java.lang.Object
  |
  +--org.mindswap.xmlparser.xml.util.XMLResourceList

public class XMLResourceList
extends java.lang.Object


Constructor Summary
XMLResourceList()
           
 
Method Summary
 void addElement(XMLResource res)
          Adds the parameter to the list if it has not already been added.

 boolean contains(java.lang.Object obj)
          Returns true or false depending on whether the parameter is currently in the list.

 XMLResource elementAt(int index)
          Returns the element at the specified index.

 XMLResource getResourceByFriendlyName(java.lang.String name)
          Search through the list and return the resource with the specified friendly name.

 XMLResource getResourceByName(java.lang.String name)
          Search through the list and return the resource with the specified name.

 void remove(XMLResource res)
          Removes the element from the list if it is in the list.

 int size()
          Removes all elements from the list.

 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLResourceList

public XMLResourceList()
Method Detail

addElement

public void addElement(XMLResource res)
Adds the parameter to the list if it has not already been added.

Parameters:
res - Element to be added

remove

public void remove(XMLResource res)
Removes the element from the list if it is in the list.

Parameters:
res - Element to be removed

elementAt

public XMLResource elementAt(int index)
Returns the element at the specified index.

Parameters:
index - Index in array
Returns:
Element at index

size

public int size()
Removes all elements from the list.


contains

public boolean contains(java.lang.Object obj)
Returns true or false depending on whether the parameter is currently in the list.

Parameters:
obj - Element to search for
Returns:
true if the element is in the list, false otherwise

getResourceByName

public XMLResource getResourceByName(java.lang.String name)
Search through the list and return the resource with the specified name.

Parameters:
name - Name of resource to search for
Returns:
Resource with specified name, or null if not found.

getResourceByFriendlyName

public XMLResource getResourceByFriendlyName(java.lang.String name)
Search through the list and return the resource with the specified friendly name.

Parameters:
name - Name of resource to search for
Returns:
Resource with specified friendly name, or null if not found.