com.crystaldecisions.sdk.occa.report.data
Class SummaryFields

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.ArrayList
              extended by com.crystaldecisions.sdk.occa.report.lib.ClonableList
                  extended by com.crystaldecisions.sdk.occa.report.lib.ReportSDKVector
                      extended by com.crystaldecisions.sdk.occa.report.lib.ReportSDKVectorInternal
                          extended by com.crystaldecisions.sdk.occa.report.data.Fields
                              extended by com.crystaldecisions.sdk.occa.report.data.SummaryFields
All Implemented Interfaces:
IClone, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class SummaryFields
extends Fields

This object defines a collection of SummaryField objects.

See Also:
Serialized Form

Method Summary
 boolean add(ISummaryField o)
           Appends the specified element to the end of this list.
 void add(int index, ISummaryField element)
           Inserts the specified element at the specified position in this list.
 boolean addAll(java.util.Collection 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 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.
 ISummaryField 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.
 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.
 ISummaryField 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.
 ISummaryField set(int index, ISummaryField 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, isOwner, readElement, save, save, saveContents, startElement
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ReportSDKVectorInternal
addElement, addEventListener, removeAllElements
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ReportSDKVector
addNullElement, elementAt, insertElementAt
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ClonableList
copyTo, findIndexOf
 
Methods inherited from class java.util.ArrayList
clone, ensureCapacity, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Method Detail

add

public void add(int index,
                ISummaryField 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).

Specified by:
add in interface java.util.List
Overrides:
add in class ReportSDKVectorInternal
Parameters:
index - The index at which the specified element is to be inserted.
element - The element to be inserted.

add

public boolean add(ISummaryField o)

Appends the specified element to the end of this list.

Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.List
Overrides:
add in class ReportSDKVectorInternal
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 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.

Specified by:
addAll in interface java.util.List
Overrides:
addAll in class ReportSDKVectorInternal
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 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.)

Specified by:
addAll in interface java.util.Collection
Specified by:
addAll in interface java.util.List
Overrides:
addAll in class ReportSDKVectorInternal
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.

Specified by:
clear in interface java.util.Collection
Specified by:
clear in interface java.util.List
Overrides:
clear in class ReportSDKVectorInternal

clone

public java.lang.Object clone(boolean deepClone)
Overrides:
clone in class ClonableList

contains

public boolean contains(java.lang.Object o)

Returns true if this list contains the specified element.

Specified by:
contains in interface java.util.Collection
Specified by:
contains in interface java.util.List
Overrides:
contains in class java.util.ArrayList
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.

Specified by:
containsAll in interface java.util.Collection
Specified by:
containsAll in interface java.util.List
Overrides:
containsAll in class java.util.AbstractCollection
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.

Overrides:
copyTo in class ClonableList
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
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 ISummaryField get(int index)

Returns the element at the specified position in this list.

Specified by:
get in interface java.util.List
Overrides:
get in class java.util.ArrayList
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
Parameters:
index - The index of the desired field.
Returns:
The IField object at the specified index.

hasContent

public boolean hasContent(java.lang.Object object)
Overrides:
hasContent in class ClonableList

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.

Specified by:
indexOf in interface java.util.List
Overrides:
indexOf in class java.util.ArrayList
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.

Specified by:
isEmpty in interface java.util.Collection
Specified by:
isEmpty in interface java.util.List
Overrides:
isEmpty in class java.util.ArrayList
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.

Specified by:
iterator in interface java.lang.Iterable
Specified by:
iterator in interface java.util.Collection
Specified by:
iterator in interface java.util.List
Overrides:
iterator in class java.util.AbstractList
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.

Specified by:
lastIndexOf in interface java.util.List
Overrides:
lastIndexOf in class java.util.ArrayList
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).

Specified by:
listIterator in interface java.util.List
Overrides:
listIterator in class java.util.AbstractList
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.

Specified by:
listIterator in interface java.util.List
Overrides:
listIterator in class java.util.AbstractList
Parameters:
index - The index of the first element to be returned from the list iterator (by a call to the nextmethod).
Returns:
A list iterator of the elements in this list (in proper sequence), starting at the specified position in the list.

remove

public ISummaryField 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).

Specified by:
remove in interface java.util.List
Overrides:
remove in class ReportSDKVectorInternal
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.

Specified by:
remove in interface java.util.Collection
Specified by:
remove in interface java.util.List
Overrides:
remove in class ReportSDKVectorInternal
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.

Specified by:
removeAll in interface java.util.Collection
Specified by:
removeAll in interface java.util.List
Overrides:
removeAll in class ReportSDKVectorInternal
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.

Specified by:
retainAll in interface java.util.Collection
Specified by:
retainAll in interface java.util.List
Overrides:
retainAll in class ReportSDKVectorInternal

set

public ISummaryField set(int index,
                         ISummaryField element)

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

Specified by:
set in interface java.util.List
Overrides:
set in class ReportSDKVectorInternal
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.

Specified by:
size in interface java.util.Collection
Specified by:
size in interface java.util.List
Overrides:
size in class java.util.ArrayList
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.

Specified by:
subList in interface java.util.List
Overrides:
subList in class java.util.AbstractList
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.

Specified by:
toArray in interface java.util.Collection
Specified by:
toArray in interface java.util.List
Overrides:
toArray in class java.util.ArrayList
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.

Specified by:
toArray in interface java.util.Collection
Specified by:
toArray in interface java.util.List
Overrides:
toArray in class java.util.ArrayList
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.