Evaluating Software Design Patterns
— the "Gang of Four" patterns implemented in Java 6

dk.rode.thesis.meta.util
Class Arguments.Argument

java.lang.Object
  extended by dk.rode.thesis.meta.util.Arguments.Argument
Enclosing class:
Arguments

public static final class Arguments.Argument
extends Object

An argument represents a single argument, with or without an associated value.

Author:
Gunni Rode / rode.dk

Field Summary
 String name
          The argument name (excluding prefixed -).
 String value
          The associated value.
 
Constructor Summary
Arguments.Argument(String name, String value)
          Constructor.
 
Method Summary
 boolean equals(Object object)
          Returns true if object is an argument with the same name as this argument, regardless of value.
 int hashCode()
          Returns the hash code of this argument.
 String toString()
          Returns the string representation of this argument.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public final String name
The argument name (excluding prefixed -).

Never null.


value

public final String value
The associated value.

Can be null.

Constructor Detail

Arguments.Argument

Arguments.Argument(String name,
                   String value)
Constructor.

Parameters:
name - The argument name, excluding prefixed -; never null.
value - The associated value; can be null.
Method Detail

equals

public final boolean equals(Object object)
Returns true if object is an argument with the same name as this argument, regardless of value.

Overrides:
equals in class Object
Parameters:
object - The object to test; can be null.
Returns:
True if equal, false if not.

hashCode

public final int hashCode()
Returns the hash code of this argument.

Overrides:
hashCode in class Object
Returns:
The hash code.

toString

public String toString()
Returns the string representation of this argument.

Overrides:
toString in class Object
Returns:
The string representation; never null.

Gunni Rode / rode.dk

Feel free to use and/or modify the Java 6 source code developed for this thesis AT YOUR OWN RISK, but note that the source code comes WITHOUT ANY — and I do mean WITHOUT ANY — form of warranty WHAT SO EVER!

The original thesis and source code are available at rode.dk/thesis.