SAP NetWeaver '04

com.sapportals.wcm.repository.service.statemanagement
Interface IList

[contained in: com.sap.km.cm.repository.service.base.par - km.shared.repository.service.statemanagement_api.jar]
All Known Subinterfaces:
IResourceTransitionList

public interface IList

It is planned to extend this interface to implement type-safe lists. In this interface, all methods from the java.util.list interface that are type-independent are collected. The IList interface may be extended in order to add methods for type-safe handling of list elements.

See Also:
java.util.list

Method Summary
 void clear()
          Removes all of the elements from this list (optional operation).
 boolean contains(java.lang.Object o)
          Returns true if this list contains the specified element.
 boolean containsAll(java.util.Collection c)
          Returns true if this list contains all of the elements of the specified collection
 boolean equals(java.lang.Object o)
          Compares the specified object with this list for parity.
 int hashCode()
          Returns the hash code value for this list.
 int indexOf(java.lang.Object o)
          Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
 boolean isEmpty()
          Returns true if this list contains no elements
 int lastIndexOf(java.lang.Object o)
          Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.
 boolean remove(java.lang.Object o)
          Removes the first occurrence in this list of the specified element (optional operation).
 boolean removeAll(java.util.Collection c)
          Removes from this list all the elements that are contained in the specified collection (optional operation)
 boolean retainAll(java.util.Collection c)
          Retains only the elements in this list that are contained in the specified collection (optional operation).
 int size()
          Returns the number of elements in this list.
 

Method Detail

isEmpty

public boolean isEmpty()
Returns true if this list contains no elements
Returns:
true if this list contains no elements

size

public int size()
Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE .
Returns:
the number of elements in this list

contains

public boolean contains(java.lang.Object o)
Returns true if this list contains the specified element. More formally, returns true if, and only if, this list contains at least one element e such as (o==null ? e==null : o.equals(e)) .
Parameters:
o - element whose presence in this list is to be tested
Returns:
true if this list contains the specified element

remove

public boolean remove(java.lang.Object o)
Removes the first occurrence in this list of the specified element (optional operation). If this list does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such as (o==null ? get(i)==null : o.equals(get(i))) (if such an element exists).
Parameters:
o - element to be removed from this list, if present
Returns:
true if this list contained the specified element
Throws:
java.lang.UnsupportedOperationException - if the remove method is not supported by this list

containsAll

public boolean containsAll(java.util.Collection c)
Returns true if this list contains all of the elements of the specified collection
Parameters:
c - collection to be checked for containment in this list
Returns:
true if this list contains all of the elements of the specified collection.
See Also:
contains(Object)

removeAll

public boolean removeAll(java.util.Collection c)
Removes from this list all the elements that are contained in the specified collection (optional operation)
Parameters:
c - collection that defines which elements are to be removed from this list
Returns:
true if this list is changed as a result of the call
Throws:
java.lang.UnsupportedOperationException - if the removeAll method is not supported by this list
See Also:
remove(Object), contains(Object)

retainAll

public boolean retainAll(java.util.Collection c)
Retains only the elements in this list that are contained in the specified collection (optional operation). In other words, removes from this list all the elements that are not contained in the specified collection.
Parameters:
c - collection that defines which elements this set is to retain
Returns:
true if this list is changed as a result of the call
Throws:
java.lang.UnsupportedOperationException - if the retainAll method is not supported by this list
See Also:
remove(Object), contains(Object)

clear

public void clear()
Removes all of the elements from this list (optional operation). This list is be empty after this call returns (unless it throws an exception).
Throws:
java.lang.UnsupportedOperationException - if the clear method is not supported by this list

equals

public boolean equals(java.lang.Object o)
Compares the specified object with this list for parity. Returns true if, and only if, the specified object is also a list, both lists have the same size, and all corresponding pairs of elements in the two lists are equal . (Two elements e1 and e2 are equal if (e1==null ? e2==null : e1.equals(e2)) .) In other words, two lists are defined as being equal if they contain the same elements in the same order. This definition ensures that the equals method works properly across different implementations of the List interface.
Overrides:
equals in class java.lang.Object
Parameters:
o - the object to be compared for parity with this list
Returns:
true if the specified object is the same as this list

hashCode

public int hashCode()
Returns the hash code value for this list. The hash code of a list is defined as being the result of the following calculation:
  hashCode = 1;
  Iterator i = list.iterator();
  while (i.hasNext()) {
      Object obj = i.next();
      hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode());
  }
 
This ensures that list1.equals(list2) implies that list1.hashCode()==list2.hashCode() for any two lists, list1 and list2 , as required by the general contract of Object.hashCode .
Overrides:
hashCode in class java.lang.Object
Returns:
the hash code value for this list
See Also:
equals(Object)

indexOf

public int indexOf(java.lang.Object o)
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. More formally, returns the lowest index i such as (o==null ? get(i)==null : o.equals(get(i))) , or -1 if there is no such index.
Parameters:
o - element to search for
Returns:
the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element

lastIndexOf

public int lastIndexOf(java.lang.Object o)
Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element. More formally, returns the highest index i such as (o==null ? get(i)==null : o.equals(get(i))) , or -1 if there is no such index.
Parameters:
o - element to search for
Returns:
the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element

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.