Chart FX 7 for Java Server

com.softwarefx.chartfx.server
Class SubCommandCollection

java.lang.Object
  extended by com.softwarefx.chartfx.server.SubCommandCollection
All Implemented Interfaces:
Iterable<Integer>, Collection<Integer>

public class SubCommandCollection
extends Object
implements Iterable<Integer>, Collection<Integer>

Provides access to the SubCommandCollection object.


Constructor Summary
SubCommandCollection()
           
 
Method Summary
 void add(CommandId commandId)
          Appends the specified element to the SubCommandCollection collection.
 boolean add(Integer o)
          Appends the specified element to the SubCommandCollection collection.
 boolean addAll(Collection<? extends Integer> c)
          Adds all of the elements in the specified collection to the SubCommandCollection collection.
 void addRange(int[] commands)
          Adds an array of objects to the SubCommandCollection collection.
 void clear()
          Removes all of the elements from this collection.
 boolean contains(Object o)
          Returns true if the SubCommandCollection contains the specified element.
 boolean containsAll(Collection<?> c)
          Returns true if the SubCommandCollection collection contains all of the elements in the specified collection.
 void copyTo(int[] items, int index)
          Copies the entire Collection to a compatible one-dimensional Array, starting at the specified index of the target array.
 int get(int n)
          Returns the element at the specified position in the SubCommandCollection.
 int getSelectedIndex()
          Gets the SelectedIndex.
 int indexOf(int commandId)
          Returns the index in the SubCommandCollection of the first occurrence of the specified element, or -1 if this list does not contain this element.
 void insert(int index, CommandId commandId)
          Inserts an element into the ArrayList at the specified index.
 void insert(int index, int commandId)
          Inserts an element into the ArrayList at the specified index.
 boolean isEmpty()
          Returns true if this collection contains no elements.
 Iterator<Integer> iterator()
          Returns an iterator over the elements in this collection.
 boolean remove(Object o)
          Removes the specified element from the SubCommandCollection collection.
 boolean removeAll(Collection<?> c)
          Removes all of the elements in the specified collection from the SubCommandCollection collection.
 void removeAt(int index)
          Removes the element in the specified position from the SubCommandCollection collection.
 boolean retainAll(Collection<?> c)
          Retains only the elements in the SubCommandCollection collection that are contained in the specified collection.
 void set(int n, int value)
          Replaces the element at the specified position in the SubCommandCollection collection with the specified element.
 void setSelectedIndex(int value)
          Sets the SelectedIndex.
 int size()
          Returns the number of elements in this collection.
 Object[] toArray()
          Returns an array containing all of the elements in this collection in proper sequence.
<T> T[]
toArray(T[] a)
          Returns an array containing all of the elements in this collection in proper sequence.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

SubCommandCollection

public SubCommandCollection()
Method Detail

add

public void add(CommandId commandId)

Appends the specified element to the SubCommandCollection collection.

Parameters:
commandId - The item to add to the SubCommandCollection collection.

add

public boolean add(Integer o)

Appends the specified element to the SubCommandCollection collection.

Specified by:
add in interface Collection<Integer>
Parameters:
o - The item to add to the SubCommandCollection collection.

addAll

public boolean addAll(Collection<? extends Integer> c)

Adds all of the elements in the specified collection to the SubCommandCollection collection.

Specified by:
addAll in interface Collection<Integer>
Parameters:
c - Elements to be inserted into this collection.

addRange

public void addRange(int[] commands)

Adds an array of objects to the SubCommandCollection collection.

Parameters:
commands -

clear

public void clear()

Removes all of the elements from this collection.

Specified by:
clear in interface Collection<Integer>

contains

public boolean contains(Object o)

Returns true if the SubCommandCollection contains the specified element.

Specified by:
contains in interface Collection<Integer>
Parameters:
o - Element whose presence in this collection is to be tested.

containsAll

public boolean containsAll(Collection<?> c)

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

Specified by:
containsAll in interface Collection<Integer>
Parameters:
c - Collection to be checked for containment in this collection.

copyTo

public void copyTo(int[] items,
                   int index)

Copies the entire Collection to a compatible one-dimensional Array, starting at the specified index of the target array.

Parameters:
items - The one-dimensional Array that is the destination of the elements copied from SubCommandCollection. The Array must have zero-based indexing.
index - The zero-based index in array at which copying begins.

get

public int get(int n)

Returns the element at the specified position in the SubCommandCollection.

Parameters:
n - Index of element to return.

getSelectedIndex

public int getSelectedIndex()

Gets the SelectedIndex. For more detail see setSelectedIndex(int).


indexOf

public int indexOf(int commandId)

Returns the index in the SubCommandCollection of the first occurrence of the specified element, or -1 if this list does not contain this element.

Parameters:
commandId -

insert

public void insert(int index,
                   CommandId commandId)

Inserts an element into the ArrayList at the specified index.

Parameters:
index - The zero-based index at which position should be inserted.
commandId -

insert

public void insert(int index,
                   int commandId)

Inserts an element into the ArrayList at the specified index.

Parameters:
index - The zero-based index at which position should be inserted.
commandId -

isEmpty

public boolean isEmpty()

Returns true if this collection contains no elements.

Specified by:
isEmpty in interface Collection<Integer>

iterator

public Iterator<Integer> iterator()

Returns an iterator over the elements in this collection.

Specified by:
iterator in interface Iterable<Integer>
Specified by:
iterator in interface Collection<Integer>

remove

public boolean remove(Object o)

Removes the specified element from the SubCommandCollection collection.

Specified by:
remove in interface Collection<Integer>
Parameters:
o - The item to remove from the SubCommandCollection collection.

removeAll

public boolean removeAll(Collection<?> c)

Removes all of the elements in the specified collection from the SubCommandCollection collection.

Specified by:
removeAll in interface Collection<Integer>
Parameters:
c - Elements to be removed from this collection.

removeAt

public void removeAt(int index)

Removes the element in the specified position from the SubCommandCollection collection.

Parameters:
index - The index of the item to remove from the SubCommandCollection collection.

retainAll

public boolean retainAll(Collection<?> c)

Retains only the elements in the SubCommandCollection collection that are contained in the specified collection.

Specified by:
retainAll in interface Collection<Integer>
Parameters:
c - Elements to be retained in this collection.

set

public void set(int n,
                int value)

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

Parameters:
n - The index of the item to add to the SubCommandCollection collection.
value - The item to add to the SubCommandCollection collection

setSelectedIndex

public void setSelectedIndex(int value)

Sets the SelectedIndex.


size

public int size()

Returns the number of elements in this collection.

Specified by:
size in interface Collection<Integer>

toArray

public Object[] toArray()

Returns an array containing all of the elements in this collection in proper sequence.

Specified by:
toArray in interface Collection<Integer>

toArray

public <T> T[] toArray(T[] a)

Returns an array containing all of the elements in this collection in proper sequence.

Specified by:
toArray in interface Collection<Integer>

http://www.softwarefx.com

2008 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
All other names are trademarks or registered trademarks of their respective owners.