eaLib API Docs
Last Modified : January 7 2002

mss.ea.core
Class StreamGroup

java.lang.Object
  |
  +--mss.ea.core.StreamGroup

public class StreamGroup
extends java.lang.Object

Group of individual streams.

Since:
0.1
Version:
0.1 (06-07-2001)
Author:
Andreas Rummler

Field Summary
protected  java.util.LinkedList group
          Linked list that holds the streams.
 
Constructor Summary
StreamGroup()
          Constructor.
StreamGroup(java.util.Collection c)
          Constructor with initial collection.
StreamGroup(IndividualStream[] ia)
          Constructor with initial array.
 
Method Summary
 void add(IndividualStream i)
          Adds an individual stream to this group.
 void empty()
          Removes all streams from this group.
 IndividualStream get(int index)
          Gets an individual stream from this group.
 void set(IndividualStream i, int index)
          Replaces an individual stream in this group.
 int size()
          Returns the size of this group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

group

protected java.util.LinkedList group
Linked list that holds the streams.
Constructor Detail

StreamGroup

public StreamGroup()
Constructor.

StreamGroup

public StreamGroup(java.util.Collection c)
Constructor with initial collection. The user must ensure that the collection holds only objects of type IndividualStream, otherwise there will be a ClassCastException thrwon when accessing the group.
Parameters:
c - collection of individual streams

StreamGroup

public StreamGroup(IndividualStream[] ia)
Constructor with initial array.
Parameters:
ia - array of individuals
Method Detail

empty

public void empty()
Removes all streams from this group.

add

public void add(IndividualStream i)
Adds an individual stream to this group.
Parameters:
i - individual stream to add

get

public IndividualStream get(int index)
Gets an individual stream from this group.
Parameters:
index - index of the stream to get
Returns:
individual stream

set

public void set(IndividualStream i,
                int index)
Replaces an individual stream in this group.
Parameters:
i - individual stream to add to the group
index - index of the stream to be replaced

size

public int size()
Returns the size of this group.
Returns:
size of the group

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS