com.voytechs.jnetstream.codec
Class FlowList

java.lang.Object
  extended by com.voytechs.jnetstream.codec.FlowList

public class FlowList
extends java.lang.Object

A special purpose container that contains a list of Flows. It has special search function and management capabilities that are flow related.

Since:
0.2.3
Author:
Mark Bednarczyk

Constructor Summary
FlowList()
           
 
Method Summary
 void add(Flow flow)
          Adds a flow
 int find(FlowKey key)
          Finds a flow with the given key
 Flow get(int index)
          Returns the index flow from the list of active flows.
 void remove(Flow flow)
          Removes a flow.
 int size()
          Returns the number of flows in this list.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FlowList

public FlowList()
Parameters:
-
Throws:
Method Detail

add

public void add(Flow flow)
Adds a flow

Parameters:
flow - The flow to be added.

remove

public void remove(Flow flow)
Removes a flow.

Parameters:
flow - The flow to remove from list.

find

public int find(FlowKey key)
Finds a flow with the given key


get

public Flow get(int index)
Returns the index flow from the list of active flows.

Parameters:
index - Index of the flow to return. The index value can be positive or nagative. Must a 1-based index, meaning the first entry in the list is 1 not 0. Also index of 0 is an illegal value.
Returns:
Flow found at the index, or null if index out of range.

size

public int size()
Returns the number of flows in this list.

Returns:
number of flows on this list.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object