com.sapportals.wcm.service.template

Interface ITemplateList


public interface ITemplateList

A typed list of ITemplate instances.

Copyright 2004 SAP AG


Method Summary
 void add(int index, ITemplate template)
          Inserts the specified template at the specified position in this list.
 boolean add(ITemplate template)
          Add the resource to the list.
 boolean addAll(ITemplateList list)
          Add all the elements in the specified list to this list.
 boolean containsTemplate(ITemplate template)
          Returns true if the specified resource is a member of the list.
 ITemplateList difference(ITemplateList list)
          Get the difference of this list to the given list.
 ITemplate get(int index)
          Returns the template at the specified position.
 int indexOf(ITemplate template)
          Returns the index in this list of the first occurrence of the specified template, or -1 if the List does not contain this template.
 ITemplateList intersection(ITemplateList list)
          Get the intersection of this list and the given list.
 int lastIndexOf(ITemplate template)
          Returns the index in this list of the last occurrence of the specified template, or -1 if the List does not contain this template.
 ITemplateListIterator listIterator()
          Returns a template-list-iterator of the elements in this list.
 ITemplateListIterator listIterator(int index)
          Returns a list-iterator of the elements in this list, starting at the specified position in the list.
 ITemplate remove(int index)
          Removes the template at the specified position in this list.
 boolean remove(ITemplate template)
          Removes the first occurence of the specified resource from the list.
 ITemplate set(int index, ITemplate template)
          Replaces the element at the specified position in this list with the specified template.
 int size()
          Returns the size of the list.
 void sort(Comparator comp)
          Sort the elements in the list using the specified comparator
 ITemplateList subList(int index1, int index2)
           
 ITemplateList union(ITemplateList list)
          Get the union of this list and the given list.
 

Method Detail

size

public int size()
Returns the size of the list.

Returns:
the size of the list.

containsTemplate

public boolean containsTemplate(ITemplate template)
Returns true if the specified resource is a member of the list.

Returns:
true if the specified resource is a member of the list.

add

public boolean add(ITemplate template)
Add the resource to the list.

Returns:
TBD: Description of the outgoing return value

addAll

public boolean addAll(ITemplateList 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

public boolean remove(ITemplate template)
Removes the first occurence of the specified resource from the list.

Returns:
Returns true is this list contained the specified resource.

get

public ITemplate get(int index)
Returns the template at the specified position.

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

set

public ITemplate set(int index,
                     ITemplate template)
Replaces the element at the specified position in this list with the specified template.

Parameters:
index - index of template to replace.
template - template to be stored at the specified position.
Returns:
the element previously at the specified position.

add

public void add(int index,
                ITemplate template)
Inserts the specified template at the specified position in this list. Shifts the templates currently at that position (if any) and any subsequent templates to the right (adds one to their indices).

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

remove

public ITemplate remove(int index)
Removes the template at the specified position in this list. Shifts any subsequent templates to the left (subtracts one from their indices).

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

indexOf

public int indexOf(ITemplate template)
Returns the index in this list of the first occurrence of the specified template, or -1 if the List does not contain this template.

Parameters:
template - template to search for.
Returns:
the index in this list of the first occurrence of the specified template, or -1 if the List does not contain this template.

lastIndexOf

public int lastIndexOf(ITemplate template)
Returns the index in this list of the last occurrence of the specified template, or -1 if the List does not contain this template.

Parameters:
template - template to search for.
Returns:
the index in this list of the last occurrence of the specified template, or -1 if the List does not contain this template.

listIterator

public ITemplateListIterator listIterator()
Returns a template-list-iterator of the elements in this list.

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

listIterator

public ITemplateListIterator 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 template-list-iterator of the elements in this list.

subList

public ITemplateList 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

public 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

public ITemplateList union(ITemplateList 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 ITemplateList to union with this list.
Returns:
the ITemplateList with the union list.

intersection

public ITemplateList intersection(ITemplateList 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 ITemplateList to intersect with this list.
Returns:
the ITemplateList with the intersection list.

difference

public ITemplateList difference(ITemplateList 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 ITemplateList to subtract from this list.
Returns:
the ITemplateList with the difference list.


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. 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.