SAP NetWeaver '04

com.sapportals.wcm.repository
Class ResourceList

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.framework_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.repository.ResourceList
All Implemented Interfaces:
IResourceList
Direct Known Subclasses:
TypedResourceList

public class ResourceList
extends java.lang.Object
implements IResourceList

Implements the IResourceList interface.

Copyright (c) SAP AG 2001-2004

See Also:
IResourceList

Constructor Summary
ResourceList()
          Constructs a new empty resource list.
ResourceList(ResourceList resourceList)
          Construct a new resource list containing the elements of the specified list in the same order.
 
Method Summary
 void add(int index, IResource resource)
          Inserts the specified resource at the specified position in this list.
 boolean add(IResource resource)
          Add the resource to the list.
 boolean addAll(IResourceList list)
          Add all the elements in the specified list to this list.
 boolean containsResource(IResource resource)
          Returns true if the specified resource is a member of the list.
 IResourceList difference(IResourceList list)
          Get the difference of this list to the given list.
Given a , b and c in this list; b , c and d in the given list, the result will contain only a .
 IResource get(int index)
          Returns the resource at the specified position.
 int indexOf(IResource resource)
          Returns the index in this list of the first occurrence of the specified resource, or -1 if the List does not contain this resource.
 IResourceList intersection(IResourceList list)
          Get the intersection of this list and the given list.
Given a , b and c in this list; b , c and d in the given list, the result will contain b and c .
 int lastIndexOf(IResource resource)
          Returns the index in this list of the last occurrence of the specified resource, or -1 if the List does not contain this resource.
 IResourceListIterator listIterator()
          Returns a resource-list-iterator of the elements in this list.
 IResourceListIterator listIterator(int index)
          Returns a list-iterator of the elements in this list, starting at the specified position in the list.
 IResource remove(int index)
          Removes the resource at the specified position in this list.
 boolean remove(IResource resource)
          Removes the first occurence of the specified resource from the list.
 IResource set(int index, IResource resource)
          Replaces the element at the specified position in this list with the specified resource.
 int size()
          Returns the size of the list.
 void sort(java.util.Comparator comp)
          Sort the elements in the list using the specified comparator
 IResourceList subList(int index1, int index2)
           
 java.lang.String toString()
           
 IResourceList union(IResourceList list)
          Get the union of this list and the given list.
Given a , b and c in this list; b , c and d in the given list, the result will contain a , b , c and d .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceList

public ResourceList(ResourceList resourceList)
Construct a new resource list containing the elements of the specified list in the same order.
Parameters:
resourceList - TBD: Description of the incoming method parameter

ResourceList

public ResourceList()
Constructs a new empty resource list.
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

size

public int size()
Description copied from interface: IResourceList
Returns the size of the list.
Specified by:
size in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Returns:
the size of the list.

containsResource

public boolean containsResource(IResource resource)
Description copied from interface: IResourceList
Returns true if the specified resource is a member of the list.
Specified by:
containsResource in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
resource - TBD: Description of the incoming method parameter
Returns:
true if the specified resource is a member of the list.

add

public boolean add(IResource resource)
Description copied from interface: IResourceList
Add the resource to the list.
Specified by:
add in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
resource - The resource to add to the list.
Returns:
TBD: Description of the outgoing return value

addAll

public boolean addAll(IResourceList list)
Description copied from interface: IResourceList
Add all the elements in the specified list to this list.
Specified by:
addAll in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
list - The list whose elements are to be added to this list.
Returns:
TBD: Description of the outgoing return value

remove

public boolean remove(IResource resource)
Description copied from interface: IResourceList
Removes the first occurence of the specified resource from the list.
Specified by:
remove in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
resource - TBD: Description of the incoming method parameter
Returns:
Returns true is this list contained the specified resource.

get

public IResource get(int index)
Description copied from interface: IResourceList
Returns the resource at the specified position.
Specified by:
get in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
index - of the resource to return.
Returns:
the resource at the specified position.

set

public IResource set(int index,
                     IResource resource)
Description copied from interface: IResourceList
Replaces the element at the specified position in this list with the specified resource.
Specified by:
set in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
index - index of resource to replace.
resource - resource to be stored at the specified position.
Returns:
the element previously at the specified position.

add

public void add(int index,
                IResource resource)
Description copied from interface: IResourceList
Inserts the specified resource at the specified position in this list. Shifts the resources currently at that position (if any) and any subsequent resources to the right (adds one to their indices).
Specified by:
add in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
index - at which the specified resource is to be inserted.
resource - element to be inserted.

remove

public IResource remove(int index)
Description copied from interface: IResourceList
Removes the resource at the specified position in this list. Shifts any subsequent resources to the left (subtracts one from their indices).
Specified by:
remove in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
index - the index of the resource to removed.
Returns:
the element previously at the specified position.

indexOf

public int indexOf(IResource resource)
Description copied from interface: IResourceList
Returns the index in this list of the first occurrence of the specified resource, or -1 if the List does not contain this resource.
Specified by:
indexOf in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
resource - resource to search for.
Returns:
the index in this list of the first occurrence of the specified resource, or -1 if the List does not contain this resource.

lastIndexOf

public int lastIndexOf(IResource resource)
Description copied from interface: IResourceList
Returns the index in this list of the last occurrence of the specified resource, or -1 if the List does not contain this resource.
Specified by:
lastIndexOf in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
resource - resource to search for.
Returns:
the index in this list of the last occurrence of the specified resource, or -1 if the List does not contain this resource.

listIterator

public IResourceListIterator listIterator()
Description copied from interface: IResourceList
Returns a resource-list-iterator of the elements in this list.
Specified by:
listIterator in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Returns:
a resource-list-iterator of the elements in this list.

listIterator

public IResourceListIterator listIterator(int index)
Description copied from interface: IResourceList
Returns a list-iterator of the elements in this list, starting at the specified position in the list.
Specified by:
listIterator in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
index - index of first element to be returned from the list-iterator (by a call to next).
Returns:
a resource-list-iterator of the elements in this list.

subList

public IResourceList subList(int index1,
                             int index2)
Specified by:
subList in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
index1 - TBD: Description of the incoming method parameter
index2 - TBD: Description of the incoming method parameter
Returns:
TBD: Description of the outgoing return value
See Also:
AbstractList.subList(int, int)

sort

public void sort(java.util.Comparator comp)
Description copied from interface: IResourceList
Sort the elements in the list using the specified comparator
Specified by:
sort in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
comp - The comparator used for sorting
See Also:
Comparator

union

public IResourceList union(IResourceList list)
Description copied from interface: IResourceList
Get the union of this list and the given list.
Given a , b and c in this list; b , c and d in the given list, the result will contain a , b , c and d .
Specified by:
union in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
list - the IResourceList to union with this list.
Returns:
the IResourceList with the union list.

intersection

public IResourceList intersection(IResourceList list)
Description copied from interface: IResourceList
Get the intersection of this list and the given list.
Given a , b and c in this list; b , c and d in the given list, the result will contain b and c .
Specified by:
intersection in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
list - the IResourceList to intersect with this list.
Returns:
the IResourceList with the intersection list.

difference

public IResourceList difference(IResourceList list)
Description copied from interface: IResourceList
Get the difference of this list to the given list.
Given a , b and c in this list; b , c and d in the given list, the result will contain only a .
Specified by:
difference in interface IResourceList
Following copied from interface: com.sapportals.wcm.repository.IResourceList
Parameters:
list - the IResourceList to subtract from this list.
Returns:
the IResourceList with the difference list.

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.