SAP NetWeaver '04

com.sapportals.wcm.repository.service.discussion
Interface IDiscussionItemList

[contained in: com.sap.km.cm.repository.service.par - km.shared.repository.service.app.discussion_api.jar]
public interface IDiscussionItemList

A list of IDiscussionItem objects. Declares all expected list operations, such as add(), get(), remove(), set(), size() etc.
Note that this implementation is not synchronized. If multiple threads access a list concurrently, and at least one of the threads modifies the list structurally, it must be synchronized externally. (A structural modification is any operation that adds or deletes one or more elements. Merely setting the value of an element is not a structural modification.)


Method Summary
 boolean add(IDiscussionItem discussionItem)
          Appends the specified discussion item to the end of this list.
 void add(int index, IDiscussionItem discussionItem)
          Inserts the specified discussion item at the specified position in this list.
 boolean containsDiscussionItem(IDiscussionItem discussionItem)
          Returns true if this list contains the specified element.
 IDiscussionItem get(int index)
          Gets the discussion item at the specified position in this list.
 int getPageNumber()
          Gets the pageNumber of a sublist to the entire list.
 int getStartIndex()
          Gets the startIndex of a sublist to the entire list.
 int getTotalNumber()
          Gets the number of discussion items of a superlist.
 int indexOf(IDiscussionItem discussionItem)
          Returns the index in this list of the first occurrence of the specified discussion item element, or -1 if the list does not contain this discussion item.
 int indexOf(RID itemRid)
          Returns the index in this list of the first occurrence of the specified discussion item element, or -1 if the list does not contain this discussion item.
 int lastIndexOf(IDiscussionItem discussionItem)
          Gets the index in this list of the last occurrence of the specified discussion item, or -1 if the list does not contain this discussion item.
 IDiscussionItemListIterator listIterator()
          Gets an IDiscussionItemListIterator of the discussion items in this list (in proper sequence).
 IDiscussionItemListIterator listIterator(int index)
          Returns an IDiscussionItemListIterator of the discussion items in this list (in proper sequence), starting at the specified position in the list.
 boolean remove(IDiscussionItem discussionItem)
          Removes the first occurrence of the specified discussion item in this list.
 IDiscussionItem remove(int index)
          Removes the discussion item at the specified position in this list.
 IDiscussionItem set(int index, IDiscussionItem discussionItem)
          Sets the discussion item at the specified position in this list with the specified discussion item .
 void setPageNumber(int index)
          Sets the pageNumber of a sublist to the entire list.
 void setStartIndex(int index)
          Sets the startIndex of a sublist to the entire list.
 void setTotalNumber(int number)
          Sets the number of discussion items of a superlist.
 int size()
          Returns the number of IDiscussionItems in this list.
 void sort(java.util.Comparator comp)
          Sorts this IDiscussionItemList according to the order induced by the specified comparator.
 IDiscussionItemList subList(int index1, int index2)
          Returns an IDiscussionItemList with discussion items between index1, inclusive, and index2, exclusive.
 

Method Detail

size

public int size()
Returns the number of IDiscussionItems in this list.
Returns:
the number of elements in this list

containsDiscussionItem

public boolean containsDiscussionItem(IDiscussionItem discussionItem)
Returns true if this list contains the specified element.
Parameters:
discussionItem - the element whose presence in this list is to be tested.
Returns:
true, if this list contains the specified element

add

public boolean add(IDiscussionItem discussionItem)
Appends the specified discussion item to the end of this list.
Parameters:
discussionItem - element to be appended to this list
Returns:
true (as per the general contract of Collection.add)

remove

public boolean remove(IDiscussionItem discussionItem)
Removes the first occurrence of the specified discussion item in this list. If the list does not contain the discussion item, it is unchanged.
Parameters:
discussionItem - element to be removed from this list, if present
Returns:
true, if the list contained the specified element

get

public IDiscussionItem get(int index)
Gets the discussion item at the specified position in this list.
Parameters:
index - index of discussion item to return
Returns:
the discussion item at the specified position in this list
Throws:
IndexOutOfBoundException - if the specified index is out of range (index < 0 || index >= size())

set

public IDiscussionItem set(int index,
                           IDiscussionItem discussionItem)
Sets the discussion item at the specified position in this list with the specified discussion item .
Parameters:
index - index of discussion item to replace
discussionItem - discussion item to be stored at the specified position
Returns:
the discussion item previously at the specified position

setStartIndex

public void setStartIndex(int index)
Sets the startIndex of a sublist to the entire list. If the list is a sublist a startIndex can be set to give information about pages and intervals.

getStartIndex

public int getStartIndex()
Gets the startIndex of a sublist to the entire list. If the list is a sublist a startIndex can be set to give information about pages and intervals.

setPageNumber

public void setPageNumber(int index)
Sets the pageNumber of a sublist to the entire list. If the list is a sublist a pageNumber can be set to give information about pages.

getPageNumber

public int getPageNumber()
Gets the pageNumber of a sublist to the entire list. If the list is a sublist a pageNumber can be set to give information about pages.

getTotalNumber

public int getTotalNumber()
Gets the number of discussion items of a superlist.

setTotalNumber

public void setTotalNumber(int number)
Sets the number of discussion items of a superlist.

add

public void add(int index,
                IDiscussionItem discussionItem)
Inserts the specified discussion item at the specified position in this list. Shifts the discussion item currently at that position (if any) and any subsequent discussion item to the right (adds one to their indices).
Parameters:
index - index at which the specified discussion item is to be inserted
discussionItem - discussion item to be inserted
Throws:
java.lang.IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size())

remove

public IDiscussionItem remove(int index)
Removes the discussion item at the specified position in this list. Shifts any subsequent discussion item to the left (subtracts one from their indices). Returns the discussion item that was removed from the list.
Parameters:
index - the index of the discussion item to removed
Returns:
the discussion item previously at the specified position

indexOf

public int indexOf(RID itemRid)
Returns the index in this list of the first occurrence of the specified discussion item element, or -1 if the list does not contain this discussion item.
Parameters:
itemRid - discussion item to search for
Returns:
the index in this list of the first occurrence of the specified discussion item, or -1 if the list does not contain this discussion item

indexOf

public int indexOf(IDiscussionItem discussionItem)
Returns the index in this list of the first occurrence of the specified discussion item element, or -1 if the list does not contain this discussion item.
Parameters:
discussionItem - discussion item to search for
Returns:
the index in this list of the first occurrence of the specified discussion item, or -1 if the list does not contain this discussion item

lastIndexOf

public int lastIndexOf(IDiscussionItem discussionItem)
Gets the index in this list of the last occurrence of the specified discussion item, or -1 if the list does not contain this discussion item.
Parameters:
discussionItem - discussion item to search for
Returns:
the index in this list of the last occurrence of the specified discussion item, or -1 if the list does not contain this discussion item

listIterator

public IDiscussionItemListIterator listIterator()
Gets an IDiscussionItemListIterator of the discussion items in this list (in proper sequence). Obeys the general contract of List.listIterator(int). The list iterator is fail-fast: if the list is structurally modified at any time after the iterator is created, in any way other than using the list iterator's own remove or add methods, the list iterator throws a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.
Returns:
IDiscussionItemListIterator of the discussion items in this list

listIterator

public IDiscussionItemListIterator listIterator(int index)
Returns an IDiscussionItemListIterator of the discussion items in this list (in proper sequence), starting at the specified position in the list. Obeys the general contract of List.listIterator(int). The list iterator is fail-fast: if the list is structurally modified at any time after the iterator is created, in any way other than using the list iterator's own remove or add methods, the list iterator throws a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.
Parameters:
index - index of first discussion item to be returned from the list iterator
Returns:
IDiscussionItemListIterator of the discussion items in this list (in proper sequence), starting at the specified position in the list

subList

public IDiscussionItemList subList(int index1,
                                   int index2)
Returns an IDiscussionItemList with discussion items between index1, inclusive, and index2, exclusive. (If index1 and index2 are equal, the returned list is empty.) The returned list is backed by this list, so changes in the returned list are reflected in this list, and vice versa. The returned list supports all of the optional list operations supported by this list.
Parameters:
index1 - low endpoint (inclusive) of the subList
index2 - high endpoint (exclusive) of the subList
Returns:
IDiscussionItemList with discussion items between index1 and index2

sort

public void sort(java.util.Comparator comp)
Sorts this IDiscussionItemList according to the order induced by the specified comparator.
Parameters:
comp - the comparator to determine the order of the 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.