com.crystaldecisions.sdk.occa.report.data
Class SummaryFields<E extends ISummaryField>

java.lang.Object
  extended by 
      extended by com.crystaldecisions.sdk.occa.report.data.Fields<E>
          extended by com.crystaldecisions.sdk.occa.report.data.SummaryFields<E>
All Implemented Interfaces:
IClone

public class SummaryFields<E extends ISummaryField>
extends Fields<E>

This object defines a collection of SummaryField objects.


Method Summary
 boolean add(E o)
           Appends the specified element to the end of this list.
 void add(int index, E element)
           Inserts the specified element at the specified position in this list.
 boolean addAll(java.util.Collection<? extends E> c)
           Appends all of the elements in the specified Collection object to the end of this list, in the order that they are returned by the specified Collection object's Iterator.
 boolean addAll(int index, java.util.Collection<? extends E> c)
           Inserts all of the elements in the specified Collection object into this list, starting at the specified position.
 void clear()
           Removes all of the elements from this list.
 java.lang.Object clone(boolean deepClone)
           
 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 collection contains all of the elements in the specified collection.
 void copyTo(java.lang.Object destObject, boolean deepCopy)
          Copies the object.
 int find(java.lang.String fieldName, FieldDisplayNameType displayType, java.util.Locale locale)
           Searches for a field with a particular name and returns its index.
 E get(int index)
           Returns the element at the specified position in this list.
 IField getField(int index)
           Returns the field at the specified index.
 boolean hasContent(java.lang.Object object)
           
 int indexOf(java.lang.Object o)
           Searches for the first occurrence of the given argument, testing for equality using the equals method
 int indexOf(java.lang.Object o, int index)
           Tests the given Object against the specified index for equality using the equals method. -1 is returned if the element is not found.
 boolean isEmpty()
           Tests if this list has no elements.
 boolean isOwner(java.lang.Object element)
           
 java.util.Iterator iterator()
           Returns an iterator over the elements in this list in proper sequence.
 int lastIndexOf(java.lang.Object o)
           Returns the index of the last occurrence of the specified object in this list.
 java.util.ListIterator listIterator()
           Returns an iterator of the elements in this list (in proper sequence).
 java.util.ListIterator listIterator(int index)
           Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list.
 E remove(int index)
           Removes the element at the specified position in this list.
 boolean remove(java.lang.Object o)
           Removes a single instance of the specified element from this collection, if it is present (optional operation).
 boolean removeAll(java.util.Collection c)
           Removes from this collection all of its elements that are contained in the specified collection (optional operation).
 boolean retainAll(java.util.Collection c)
          Not implemented.
 E set(int index, E element)
           Replaces the element at the specified position in this collection with the specified element.
 int size()
           Returns the number of elements in this collection.
 java.util.List subList(int fromIndex, int toIndex)
           Returns a view of the portion of this list between fromIndex, inclusive, and toIndex, exclusive.
 java.lang.Object[] toArray()
           Returns an array containing all of the elements in this list in the correct order.
 java.lang.Object[] toArray(java.lang.Object[] a)
           Returns an array containing all of the elements in this list in the correct order.
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.data.Fields
createMember, endElement, findField, isDirectlyControllable, readElement, save, save, saveContents, startElement
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public void add(int index,
                E element)

Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

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

add

public boolean add(E o)

Appends the specified element to the end of this list.

Parameters:
o - The element to be appended to this list.
Returns:
true if the specified element was added successfully.

addAll

public boolean addAll(int index,
                      java.util.Collection<? extends E> c)

Inserts all of the elements in the specified Collection object into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the list in the order that they are returned by the specified Collection object's iterator.

Parameters:
index - The index at which to insert the first element from the specified collection.
c - The elements to be inserted into this list.
Returns:
true if the specified elements were added successfully.

addAll

public boolean addAll(java.util.Collection<? extends E> c)

Appends all of the elements in the specified Collection object to the end of this list, in the order that they are returned by the specified Collection object's Iterator. The behavior of this operation is undefined if the specified Collection object is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection object is this list, and this list is not empty.)

Parameters:
c - The elements to be inserted into this list.
Returns:
true if the specified elements were added successfully.

clear

public void clear()

Removes all of the elements from this list. The list will be empty after this call returns.


clone

public java.lang.Object clone(boolean deepClone)

contains

public boolean contains(java.lang.Object o)

Returns true if this list contains the specified element.

Parameters:
o - The element whose presence in this List is to be tested.
Returns:
true if this list contains the specified element.

containsAll

public boolean containsAll(java.util.Collection<?> c)

Returns true if this collection contains all of the elements in the specified collection.

This implementation iterates over the specified Collection object, checking each element returned by the iterator in turn to see if it's contained in this collection. If all elements are so contained true is returned, otherwise false.

Parameters:
c - The collection to be checked for containment in this collection.
Returns:
true if this collection contains all of the elements in the specified collection.

copyTo

public void copyTo(java.lang.Object destObject,
                   boolean deepCopy)

Copies the object. Note that an instance of SummaryFields cannot be created as the constructor is not visible. Therefore, a destObject must be created by cloning another SummaryFields collection.

Parameters:
destObject - The destination object to copy to as a SummaryFields object.
deepCopy - true to use deep copy, false to use shallow.

find

public int find(java.lang.String fieldName,
                FieldDisplayNameType displayType,
                java.util.Locale locale)
Description copied from class: Fields

Searches for a field with a particular name and returns its index. If the item is not found, -1 is returned. The field's display name is used in the search.

Overrides:
find in class Fields<E extends ISummaryField>
Parameters:
fieldName - The name of field you want to find.
displayType - Indicates the form in which fieldName appears. It may be one of the values in FieldDisplayNameType.
locale - The locale of the field.
Returns:
The index of the field with the specified name.

get

public E get(int index)

Returns the element at the specified position in this list.

Parameters:
index - The index of element to return.
Returns:
The element at the specified position in this list.

getField

public IField getField(int index)
Description copied from class: Fields

Returns the field at the specified index.

Overrides:
getField in class Fields<E extends ISummaryField>
Parameters:
index - The index of the desired field.
Returns:
The IField object at the specified index.

hasContent

public boolean hasContent(java.lang.Object object)

indexOf

public int indexOf(java.lang.Object o)

Searches for the first occurrence of the given argument, testing for equality using the equals method. -1 is returned if the element is not found.

Parameters:
o - The object to search for.
Returns:
The index of the first occurrence of the argument in this list or -1 if the object is not found.

indexOf

public int indexOf(java.lang.Object o,
                   int index)

Tests the given Object against the specified index for equality using the equals method. -1 is returned if the element is not found.

Parameters:
o - The Object to compare against.
index - The index at which to start searching.
Returns:
The index of the specified object.

isEmpty

public boolean isEmpty()

Tests if this list has no elements.

Returns:
true if this list has no elements, false otherwise.

iterator

public java.util.Iterator iterator()

Returns an iterator over the elements in this list in proper sequence.

Returns:
An iterator over the elements in this list in proper sequence.

lastIndexOf

public int lastIndexOf(java.lang.Object o)

Returns the index of the last occurrence of the specified object in this list.

Parameters:
o - The desired element.
Returns:
The index of the last occurrence of the specified object in this list or -1 if the object is not found.

listIterator

public java.util.ListIterator listIterator()

Returns an iterator of the elements in this list (in proper sequence). This method returns listIterator(0).

Returns:
An iterator of the elements in this list (in proper sequence).

listIterator

public java.util.ListIterator listIterator(int index)

Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list. The specified index indicates the first element that would be returned by an initial call to the next method. An initial call to the previous method would return the element with the specified index minus one.

Parameters:
index - The index of the first element to be returned from the list iterator (by a call to the next method).
Returns:
A list iterator of the elements in this list (in proper sequence), starting at the specified position in the list.

remove

public E remove(int index)

Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).

Parameters:
index - The index of the element to removed.
Returns:
The element that was removed from the list.

remove

public boolean remove(java.lang.Object o)

Removes a single instance of the specified element from this collection, if it is present (optional operation). More formally, removes an element e such that (o==null ? e==null : o.equals(e)), if the collection contains one or more such elements. Returns true if the collection contained the specified element (or equivalently, if the collection changed as a result of the call).

This implementation iterates over the collection looking for the specified element. If it finds the element, it removes the element from the collection using the iterator's remove method.

Parameters:
o - The element to be removed from this collection, if present.
Returns:
true if the collection contained the specified element.

removeAll

public boolean removeAll(java.util.Collection c)

Removes from this collection all of its elements that are contained in the specified collection (optional operation).

This implementation iterates over this collection, checking each element returned by the iterator in turn to see if it's contained in the specified collection. If it's so contained, it's removed from this collection with the iterator's remove method.

Parameters:
c - The elements to be removed from this collection.
Returns:
true if this collection changed as a result of the call.

retainAll

public boolean retainAll(java.util.Collection c)

Not implemented.


set

public E set(int index,
             E element)

Replaces the element at the specified position in this collection with the specified element.

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

size

public int size()

Returns the number of elements in this collection.

Returns:
The number of elements in this list.

subList

public java.util.List subList(int fromIndex,
                              int toIndex)

Returns a view of the portion of this list between fromIndex, inclusive, and toIndex, exclusive. (If fromIndex and toIndex 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:
fromIndex - The low endpoint (inclusive) of the sub list.
toIndex - The high endpoint (exclusive) of the sub list.
Returns:
A view of the specified range within this list.

toArray

public java.lang.Object[] toArray()

Returns an array containing all of the elements in this list in the correct order.

Returns:
An array containing all of the elements in this list in the correct order.

toArray

public java.lang.Object[] toArray(java.lang.Object[] a)

Returns an array containing all of the elements in this list in the correct order. The runtime type of the returned array is that of the specified array. If the list fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this list.

If the list fits in the specified array with room to spare (For example, the array has more elements than the list), the element in the array immediately following the end of the collection is set to null. This is useful in determining the length of the list only if the caller knows that the list does not contain any null elements.

Parameters:
a - The array into which the elements of the list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
An array containing the elements of the list.

isOwner

public boolean isOwner(java.lang.Object element)
Overrides:
isOwner in class Fields<E extends ISummaryField>