com.sapportals.wcm.repository.service.statemanagement

Interface IList

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(Object o)
          Returns true if this list contains the specified element.
 boolean containsAll(Collection c)
          Returns true if this list contains all of the elements of the specified collection
 boolean equals(Object o)
          Compares the specified object with this list for parity.
 int hashCode()
          Returns the hash code value for this list.
 int indexOf(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(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(Object o)
          Removes the first occurrence in this list of the specified element (optional operation).
 boolean removeAll(Collection c)
          Removes from this list all the elements that are contained in the specified collection (optional operation)
 boolean retainAll(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

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

Returns:
true if this list contains no elements

size

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

boolean contains(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

boolean remove(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:
UnsupportedOperationException - if the remove method is not supported by this list

containsAll

boolean containsAll(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

boolean removeAll(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:
UnsupportedOperationException - if the removeAll method is not supported by this list
See Also:
remove(Object), contains(Object)

retainAll

boolean retainAll(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:
UnsupportedOperationException - if the retainAll method is not supported by this list
See Also:
remove(Object), contains(Object)

clear

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:
UnsupportedOperationException - if the clear method is not supported by this list

equals

boolean equals(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 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

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 Object
Returns:
the hash code value for this list
See Also:
equals(Object)

indexOf

int indexOf(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

int lastIndexOf(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
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 2012 SAP AG Complete Copyright Notice