Cisco Systems, Inc.

com.pcube.apps.engage.policy
Class IgnoreFilterRuleArray

java.lang.Object
  extended by com.pcube.apps.engage.policy.IgnoreFilterRuleArray
All Implemented Interfaces:
Formattable, java.io.Serializable, java.lang.Cloneable

public class IgnoreFilterRuleArray
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable, Formattable

An array of ignore filter rules.

See Also:
Serialized Form

Constructor Summary
IgnoreFilterRuleArray()
          IgnoreFilterRuleArray Constructor.
 
Method Summary
 boolean add(IgnoreFilterRule item)
          Adds a new IgnoreFilterRule to this list.
 java.lang.Object clone()
          Producing an identical object to this object.
 boolean contains(IgnoreFilterRule item)
          Checks if a certain IgnoreFilterRule exists in this list.
 boolean contains(java.lang.String item)
          Checks if a certain IgnoreFilterRule exists in this list.
 void fromStream(java.io.BufferedReader in, Formatter f)
          Method fromStream
 IgnoreFilterRule getAt(int index)
          Gets the IgnoreFilterRule this list has in a specific index.
 int getIndexOfItem(java.lang.String item)
          Gets the index of the IgnoreFilterRule in this list .
 IgnoreFilterRule getRule(java.lang.String ruleName)
          Gets the specific IgnoreFilterRule from this list.
 int getSize()
          Gets the size of this list.
 void remove(int index)
          Removes the IgnoreFilterRule which is in a certain index from this list.
 boolean remove(java.lang.String item)
          Removes the IgnoreFilterRule from this list.
 void toStream(java.io.PrintStream out, Formatter f)
          Method toStream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IgnoreFilterRuleArray

public IgnoreFilterRuleArray()
IgnoreFilterRuleArray Constructor.

Method Detail

add

public boolean add(IgnoreFilterRule item)
            throws DuplicateItemException
Adds a new IgnoreFilterRule to this list.

Parameters:
item - the added IgnoreFilterRule
Returns:
true if added, false otherwise
Throws:
DuplicateItemException - if such an IgnoreFilterRule already exists in this list

clone

public java.lang.Object clone()
Producing an identical object to this object.

Overrides:
clone in class java.lang.Object
Returns:
a newly alocated object similar to this object.

contains

public boolean contains(IgnoreFilterRule item)
Checks if a certain IgnoreFilterRule exists in this list.

Parameters:
item - the queried IgnoreFilterRule
Returns:
true if exists, false otherwise

contains

public boolean contains(java.lang.String item)
Checks if a certain IgnoreFilterRule exists in this list.

Parameters:
item - the IgnoreFilterRule's name
Returns:
true if exists, false otherwise

fromStream

public void fromStream(java.io.BufferedReader in,
                       Formatter f)
                throws ImportExportException
Description copied from interface: Formattable
Method fromStream

Specified by:
fromStream in interface Formattable
Throws:
ImportExportException
See Also:
Formattable.fromStream(java.io.BufferedReader, com.pcube.apps.engage.common.Formatter)

getAt

public IgnoreFilterRule getAt(int index)
                       throws ItemNotFoundException
Gets the IgnoreFilterRule this list has in a specific index.

Parameters:
index - the index of the desired IgnoreFilterRule
Returns:
the IgnoreFilterRule
Throws:
ItemNotFoundException - if no IgnoreFilterRule exists in the desired index

getIndexOfItem

public int getIndexOfItem(java.lang.String item)
Gets the index of the IgnoreFilterRule in this list .

Parameters:
item - the desired IgnoreFilterRule's name
Returns:
the IgnoreFilterRule's index if exists, -1 otherwise

getRule

public IgnoreFilterRule getRule(java.lang.String ruleName)
                         throws ItemNotFoundException
Gets the specific IgnoreFilterRule from this list.

Parameters:
ruleName - the desired IgnoreFilterRule's name
Returns:
the IgnoreFilterRule
Throws:
ItemNotFoundException - if no such IgnoreFilterRule exists in this list

getSize

public int getSize()
Gets the size of this list.

Returns:
this list's size

remove

public void remove(int index)
            throws ItemNotFoundException
Removes the IgnoreFilterRule which is in a certain index from this list.

Parameters:
index - the removed IgnoreFilterRule's index in this list
Throws:
ItemNotFoundException - if this list has no IgnoreFilterRule with the desired values

remove

public boolean remove(java.lang.String item)
               throws ItemNotFoundException
Removes the IgnoreFilterRule from this list.

Parameters:
item - the name of the removed IgnoreFilterRule
Returns:
true if removal succeeded, false otherwise
Throws:
ItemNotFoundException - if this list has no IgnoreFilterRule with the desired values

toStream

public void toStream(java.io.PrintStream out,
                     Formatter f)
Description copied from interface: Formattable
Method toStream

Specified by:
toStream in interface Formattable
See Also:
Formattable.toStream(java.io.PrintStream, com.pcube.apps.engage.common.Formatter)

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.