org.opennms.netmgt.config.datacollection
Class Groups

java.lang.Object
  extended by org.opennms.netmgt.config.datacollection.Groups
All Implemented Interfaces:
Serializable

public class Groups
extends Object
implements Serializable

MIB object groups

See Also:
Serialized Form

Constructor Summary
Groups()
           
 
Method Summary
 void addGroup(Group group)
           
 void addGroup(int index, Group group)
           
 Enumeration<Group> enumerateGroup()
          Method enumerateGroup.
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 Group[] getGroup()
          Method getGroup.Returns the contents of the collection in an Array.
 Group getGroup(int index)
          Method getGroup.
 List<Group> getGroupCollection()
          Method getGroupCollection.Returns a reference to '_groupList'.
 int getGroupCount()
          Method getGroupCount.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Deprecated. 
 Iterator<Group> iterateGroup()
          Method iterateGroup.
 void marshal(ContentHandler handler)
          Deprecated. 
 void marshal(Writer out)
          Deprecated. 
 void removeAllGroup()
           
 boolean removeGroup(Group group)
          Method removeGroup.
 Group removeGroupAt(int index)
          Method removeGroupAt.
 void setGroup(Group[] groups)
           
 void setGroup(int index, Group group)
           
 void setGroup(List<Group> groups)
          Sets the value of '_groupList' by copying the given Vector.
 void setGroupCollection(List<Group> groups)
          Deprecated.  
static Groups unmarshal(Reader reader)
          Deprecated. 
 void validate()
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Groups

public Groups()
Method Detail

addGroup

public void addGroup(Group group)
              throws IndexOutOfBoundsException
Parameters:
group -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addGroup

public void addGroup(int index,
                     Group group)
              throws IndexOutOfBoundsException
Parameters:
index -
group -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateGroup

public Enumeration<Group> enumerateGroup()
Method enumerateGroup.

Returns:
an Enumeration over all possible elements of this collection

equals

public boolean equals(Object obj)
Overrides the java.lang.Object.equals method.

Overrides:
equals in class Object
Parameters:
obj -
Returns:
true if the objects are equal.

getGroup

public Group getGroup(int index)
               throws IndexOutOfBoundsException
Method getGroup.

Parameters:
index -
Returns:
the value of the types.Group at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getGroup

public Group[] getGroup()
Method getGroup.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getGroupCollection

public List<Group> getGroupCollection()
Method getGroupCollection.Returns a reference to '_groupList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getGroupCount

public int getGroupCount()
Method getGroupCount.

Returns:
the size of this collection

hashCode

public int hashCode()
Overrides the java.lang.Object.hashCode method.

The following steps came from Effective Java Programming Language Guide by Joshua Bloch, Chapter 3

Overrides:
hashCode in class Object
Returns:
a hash code value for the object.

isValid

@Deprecated
public boolean isValid()
Deprecated. 

Method isValid.

Returns:
true if this object is valid according to the schema

iterateGroup

public Iterator<Group> iterateGroup()
Method iterateGroup.

Returns:
an Iterator over all possible elements in this collection

marshal

@Deprecated
public void marshal(Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Deprecated. 

Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

@Deprecated
public void marshal(ContentHandler handler)
             throws IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Deprecated. 

Parameters:
handler -
Throws:
IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllGroup

public void removeAllGroup()

removeGroup

public boolean removeGroup(Group group)
Method removeGroup.

Parameters:
group -
Returns:
true if the object was removed from the collection.

removeGroupAt

public Group removeGroupAt(int index)
Method removeGroupAt.

Parameters:
index -
Returns:
the element removed from the collection

setGroup

public void setGroup(int index,
                     Group group)
              throws IndexOutOfBoundsException
Parameters:
index -
group -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setGroup

public void setGroup(Group[] groups)
Parameters:
groups -

setGroup

public void setGroup(List<Group> groups)
Sets the value of '_groupList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
groups - the Vector to copy.

setGroupCollection

public void setGroupCollection(List<Group> groups)
Deprecated. 

Sets the value of '_groupList' by setting it to the given Vector. No type checking is performed.

Parameters:
groups - the Vector to set.

unmarshal

@Deprecated
public static Groups unmarshal(Reader reader)
                        throws org.exolab.castor.xml.MarshalException,
                               org.exolab.castor.xml.ValidationException
Deprecated. 

Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled Groups
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

@Deprecated
public void validate()
              throws org.exolab.castor.xml.ValidationException
Deprecated. 

Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright © 2011. All Rights Reserved.