org.jdtaus.core.container
Class Arguments

java.lang.Object
  extended by org.jdtaus.core.container.ModelObject
      extended by org.jdtaus.core.container.Arguments
All Implemented Interfaces:
Serializable, Cloneable

public class Arguments
extends ModelObject
implements Cloneable, Serializable

Collection of arguments.

Version:
$Id: Arguments.java 8044 2009-07-02 01:29:05Z schulte2005 $
Author:
Christian Schulte
See Also:
Serialized Form

Constructor Summary
Arguments()
           
 
Method Summary
 Object clone()
          Creates and returns a deep copy of this object.
 boolean equals(Object o)
          Indicates whether some other object is equal to this one by comparing the values of all properties.
 Argument getArgument(int index)
          Gets an argument for an index.
 Argument getArgument(String name)
          Gets an argument for a name.
 Argument[] getArguments()
          Gets the arguments of the collection.
 int hashCode()
          Returns a hash code value for this object.
 void setArguments(Argument[] value)
          Setter for property arguments.
 int size()
          Gets the number of arguments held by the instance.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class org.jdtaus.core.container.ModelObject
getDocumentation, getModelVersion, setDocumentation, setModelVersion
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Arguments

public Arguments()
Method Detail

clone

public Object clone()
Creates and returns a deep copy of this object.

Overrides:
clone in class Object
Returns:
a clone of this instance.

equals

public boolean equals(Object o)
Indicates whether some other object is equal to this one by comparing the values of all properties.

Overrides:
equals in class Object
Parameters:
o - the reference object with which to compare.
Returns:
true if this object is the same as o; false otherwise.

getArgument

public final Argument getArgument(int index)
Gets an argument for an index.

Parameters:
index - the index of the argument to return.
Returns:
a reference to the argument at index.
Throws:
IndexOutOfBoundsException - if index is negativ, greater than or equal to size().

getArgument

public Argument getArgument(String name)
Gets an argument for a name.

Parameters:
name - the name of the argument to return.
Returns:
a reference to the argument with name name.
Throws:
NullPointerException - if name is null.
MissingArgumentException - if no argument matching name exists in the collection.

getArguments

public Argument[] getArguments()
Gets the arguments of the collection.

Returns:
the arguments of the collection.

hashCode

public int hashCode()
Returns a hash code value for this object.

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

setArguments

public void setArguments(Argument[] value)
Setter for property arguments.

Parameters:
value - the new arguments for the instance.
Throws:
DuplicateArgumentException - if value contains duplicate arguments.

size

public final int size()
Gets the number of arguments held by the instance.

Returns:
the number of arguments held by the instance.

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object.


Copyright © 2005-2009 jDTAUS. All Rights Reserved.