SAP NetWeaver '04

com.sapportals.wcm.service.relation
Interface IRelationList

[contained in: com.sap.netweaver.bc.rf.service.par - bc.rf.global.service.relation_api.jar]
public interface IRelationList

A typed list for IRelation s.


Method Summary
 void add(int index, IRelation relation)
          Insert the specified relation at the specified position in this list.
 boolean add(IRelation relation)
          Add a relation to the list.
 boolean addAll(IRelationList list)
          Add all the elements in the specified list to this list.
 boolean contains(IRelation relation)
          Check if the specified relation is in the list.
 IRelationList difference(IRelationList 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 .
 IRelation get(int index)
          Return the relation at the specified position.
 java.util.Collection getCollection()
          Return this typed list as an standard java collection.
 int indexOf(IRelation relation)
          Return the index of the first occurrence of the specified relation in this list, or -1 if the list does not contain the relation.
 IRelationList intersection(IRelationList list)
          Get the intersection of this list and the given list.
 int lastIndexOf(IRelation relation)
          Return the index of the last occurrence of the specified relation in this list, or -1 if the list does not contain the relation.
 IRelationListIterator listIterator()
          Return an iterator for the elements in this list.
 IRelationListIterator listIterator(int index)
          Return an iterator for the elements in this list which starts at the specified position in the list.
 IRelation remove(int index)
          Remove the relation at the specified position in this list.
 boolean remove(IRelation relation)
          Remove the first occurence of the specified relation from the list.
 IRelation set(int index, IRelation relation)
          Replace the element at the specified position in this list with the specified relation.
 int size()
          Return the number of entries in the list.
 void sort(java.util.Comparator comparator)
          Sort the elements in the list using the specified comparator.
 IRelationList subList(int startIndex, int stopIndex)
          Return a list of elements from this list which starts at the first specified position in the list and end at the second specified position.
 IRelationList union(IRelationList list)
          Get the union of this list and the given list.
 

Method Detail

getCollection

public java.util.Collection getCollection()
Return this typed list as an standard java collection.
Returns:
a Collection representing this typed list.

size

public int size()
Return the number of entries in the list.
Returns:
an int with the size of the list.

contains

public boolean contains(IRelation relation)
Check if the specified relation is in the list.
Parameters:
relation - TBD: Description of the incoming method parameter
Returns:
a boolean true m if the specified relation is in the list.

add

public boolean add(IRelation relation)
Add a relation to the list.
Parameters:
relation - the IRelation to add to the list.
Returns:
a boolean true , if the specified relation was added, false if it's already in the list.

addAll

public boolean addAll(IRelationList list)
Add all the elements in the specified list to this list.
Parameters:
list - the IRelationList with the elements to be added to this list.
Returns:
a boolean true , if the list was changed, false if no element was added to the list at all.

remove

public boolean remove(IRelation relation)
Remove the first occurence of the specified relation from the list.
Parameters:
relation - TBD: Description of the incoming method parameter
Returns:
a boolean true , if the specified relation was contained in the list and removed, false if the list was not changed.

get

public IRelation get(int index)
Return the relation at the specified position.
Parameters:
index - an int with the position of the desired relation.
Returns:
an IRelation with the relation at the specified position.

set

public IRelation set(int index,
                     IRelation relation)
Replace the element at the specified position in this list with the specified relation.
Parameters:
index - an int with the position of the relation to replace.
relation - the IRelation to be stored at the specified position.
Returns:
a IRelation with the old element that was at the specified position before replacement.

add

public void add(int index,
                IRelation relation)
Insert the specified relation at the specified position in this list. The relations after this position will be shifted to the right (one will be added to their indices).
Parameters:
index - an int with the position of the relation to be inserted.
relation - the IRelation to be inserted at the specified position.

remove

public IRelation remove(int index)
Remove the relation at the specified position in this list. The relations after this position will be shifted to the left (one will be subtracted from their indices).
Parameters:
index - an int with the position of the relation to remove.
Returns:
a IRelation with the removed element.

indexOf

public int indexOf(IRelation relation)
Return the index of the first occurrence of the specified relation in this list, or -1 if the list does not contain the relation.
Parameters:
relation - the IRelation to search for.
Returns:
an int with the index of the first occurrence of the specified relation, or -1 if the list does not contain the given relation.

lastIndexOf

public int lastIndexOf(IRelation relation)
Return the index of the last occurrence of the specified relation in this list, or -1 if the list does not contain the relation.
Parameters:
relation - the IRelation to search for.
Returns:
an int with the index of the last occurrence of the specified relation, or -1 if the list does not contain the given relation.

listIterator

public IRelationListIterator listIterator()
Return an iterator for the elements in this list.
Returns:
a IRelationListIterator for the elements in this list.

listIterator

public IRelationListIterator listIterator(int index)
Return an iterator for the elements in this list which starts at the specified position in the list.
Parameters:
index - an int with the index to start the iterator at.
Returns:
a IRelationListIterator for the elements in this list.

subList

public IRelationList subList(int startIndex,
                             int stopIndex)
Return a list of elements from this list which starts at the first specified position in the list and end at the second specified position.
Parameters:
startIndex - an int with the index to start the sub list at.
stopIndex - an int with the index to stop the sub list at.
Returns:
a IRelationList with the elements of the sub-list.

sort

public void sort(java.util.Comparator comparator)
Sort the elements in the list using the specified comparator.
Parameters:
comparator - the Comparator to be used for sorting.

union

public IRelationList union(IRelationList 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 . Unlike as with addAll() duplicates will be removed.
Parameters:
list - the IRelationList to union with this list.
Returns:
the IRelationList with the union list.

intersection

public IRelationList intersection(IRelationList 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 . Duplicates will be removed.
Parameters:
list - the IRelationList to intersect with this list.
Returns:
the IRelationList with the intersection list.

difference

public IRelationList difference(IRelationList 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 . Duplicates will be removed.
Parameters:
list - the IRelationList to subtract from this list.
Returns:
the IRelationList 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.