com.sapportals.wcm.repository

Interface IResourceList

All Known Subinterfaces:
ICompletedResourceList, ITypedResourceList, IVersionHistory
All Known Implementing Classes:
LazyResourceList, ResourceList, TypedResourceList

public interface IResourceList

A typed list of IResource instances.

Copyright 2004 SAP AG


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.
 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.
 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(Comparator comp)
          Sort the elements in the list using the specified comparator
 IResourceList subList(int index1, int index2)
           
 IResourceList union(IResourceList list)
          Get the union of this list and the given list.
 

Method Detail

size

int size()
Returns the size of the list.

Returns:
the size of the list.

containsResource

boolean containsResource(IResource resource)
Returns true if the specified resource is a member of the list.

Parameters:
resource - TBD: Description of the incoming method parameter
Returns:
true if the specified resource is a member of the list.

add

boolean add(IResource resource)
Add the resource to the list.

Parameters:
resource - The resource to add to the list.
Returns:
TBD: Description of the outgoing return value

addAll

boolean addAll(IResourceList list)
Add all the elements in the specified list to this list.

Parameters:
list - The list whose elements are to be added to this list.
Returns:
TBD: Description of the outgoing return value

remove

boolean remove(IResource resource)
Removes the first occurence of the specified resource from the list.

Parameters:
resource - TBD: Description of the incoming method parameter
Returns:
Returns true is this list contained the specified resource.

get

IResource get(int index)
Returns the resource at the specified position.

Parameters:
index - of the resource to return.
Returns:
the resource at the specified position.

set

IResource set(int index,
              IResource resource)
Replaces the element at the specified position in this list with the specified resource.

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

void add(int index,
         IResource resource)
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).

Parameters:
index - at which the specified resource is to be inserted.
resource - element to be inserted.

remove

IResource remove(int index)
Removes the resource at the specified position in this list. Shifts any subsequent resources to the left (subtracts one from their indices).

Parameters:
index - the index of the resource to removed.
Returns:
the element previously at the specified position.

indexOf

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.

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

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.

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

IResourceListIterator listIterator()
Returns a resource-list-iterator of the elements in this list.

Returns:
a resource-list-iterator of the elements in this list.

listIterator

IResourceListIterator listIterator(int index)
Returns a list-iterator of the elements in this list, starting at the specified position in the list.

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

IResourceList subList(int index1,
                      int index2)
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

void sort(Comparator comp)
Sort the elements in the list using the specified comparator

Parameters:
comp - The comparator used for sorting
See Also:
Comparator

union

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 .

Parameters:
list - the IResourceList to union with this list.
Returns:
the IResourceList with the union list.

intersection

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 .

Parameters:
list - the IResourceList to intersect with this list.
Returns:
the IResourceList with the intersection list.

difference

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 .

Parameters:
list - the IResourceList to subtract from this list.
Returns:
the IResourceList with the difference list.
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM


Copyright 2011 SAP AG Complete Copyright Notice