Cisco Systems, Inc.

com.pcube.apps.engage.policy
Class PackageComboArray

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

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

An array of package combo's.

See Also:
Serialized Form

Field Summary
 com.pcube.apps.engage.management.PrimitiveList array
           
 
Constructor Summary
PackageComboArray()
          PackageComboArray Constructor.
PackageComboArray(PackageCombo packageCombo)
           
PackageComboArray(PackageComboArray packageComboArray)
           
 
Method Summary
 boolean add(PackageCombo item)
          Adds a new PackageComboArray to this list.
 java.lang.Object clone()
          Producing an identical object to this object.
 boolean contains(PackageCombo item)
          Checks if a certain PackageCombo exists in this list.
 boolean contains(java.lang.String item)
          Checks if a certain PackageCombo exists in this list.
 void fromStream(java.io.BufferedReader in, Formatter f)
          Method fromStream
 PackageCombo getAt(int index)
          Gets the PackageCombo this list has in a specific index.
 int getIndexOfItem(java.lang.String item)
          Gets the index of the PackageCombo in this list .
 PackageCombo getPackageCombo(java.lang.String comboName)
          Gets the specific PackageCombo from this list.
 int getSize()
          Gets the size of this list.
 boolean isComboIndexUsed(int index)
          Checks if a certain index is occupied in this PackageComboArray.
 java.util.Iterator iterator()
           
 java.util.Iterator iterator(boolean includeUnknownSubs)
           
 void remove(int index)
          Removes the PackageCombo which is in a certain index from this list.
 boolean remove(PackageCombo item)
          Removes the PackageCombo from this list.
 boolean remove(java.lang.String item)
          Removes the PackageCombo from this list.
 void removeAll()
          Removes all the PackageCombo's
 void removeAllPackageCombosFromFilterTable()
          Removes all the Package Combos, which will be called from Package Combo Filter Table
 void removePackageComboFromFilterTable(int index)
          Removes the Package Combo, which will be called from Package Combo Filter Table
 void removePackageComboFromFilterTable(java.lang.String item)
          Removes the Package Combo, which will be called from Package Combo Filter Table
 void setPolicy(Policy policy)
           
 void toStream(java.io.PrintStream out, Formatter f)
          Method toStream
 boolean update(PackageCombo item)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

array

public com.pcube.apps.engage.management.PrimitiveList array
Constructor Detail

PackageComboArray

public PackageComboArray()
PackageComboArray Constructor.


PackageComboArray

public PackageComboArray(PackageCombo packageCombo)

PackageComboArray

public PackageComboArray(PackageComboArray packageComboArray)
Method Detail

add

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

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

update

public boolean update(PackageCombo item)
               throws ItemNotFoundException
Throws:
ItemNotFoundException

clone

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

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

contains

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

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

contains

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

Parameters:
item - the PackageCombo'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 PackageCombo getAt(int index)
                   throws ItemNotFoundException
Gets the PackageCombo this list has in a specific index.

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

getIndexOfItem

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

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

getPackageCombo

public PackageCombo getPackageCombo(java.lang.String comboName)
                             throws ItemNotFoundException
Gets the specific PackageCombo from this list.

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

getSize

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

Returns:
this list's size

isComboIndexUsed

public boolean isComboIndexUsed(int index)
Checks if a certain index is occupied in this PackageComboArray.

Parameters:
index - the index in this PackageComboArray
Returns:
true if occupied, false if available

remove

public boolean remove(PackageCombo item)
               throws ItemNotFoundException
Removes the PackageCombo from this list.

Parameters:
item -
Returns:
Throws:
ItemNotFoundException

remove

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

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

removeAll

public void removeAll()
               throws ItemNotFoundException
Removes all the PackageCombo's

Throws:
ItemNotFoundException

remove

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

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

removePackageComboFromFilterTable

public void removePackageComboFromFilterTable(java.lang.String item)
                                       throws ItemNotFoundException
Removes the Package Combo, which will be called from Package Combo Filter Table

Parameters:
item -
Throws:
ItemNotFoundException

removePackageComboFromFilterTable

public void removePackageComboFromFilterTable(int index)
                                       throws ItemNotFoundException
Removes the Package Combo, which will be called from Package Combo Filter Table

Parameters:
index -
Throws:
ItemNotFoundException

removeAllPackageCombosFromFilterTable

public void removeAllPackageCombosFromFilterTable()
                                           throws ItemNotFoundException
Removes all the Package Combos, which will be called from Package Combo Filter Table

Throws:
ItemNotFoundException

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)

iterator

public java.util.Iterator iterator()
Returns:
an iterator that returns only used addongroups

iterator

public java.util.Iterator iterator(boolean includeUnknownSubs)

setPolicy

public void setPolicy(Policy policy)

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.