org.decisiondeck.xmcda_oo.structure
Class Alternative

java.lang.Object
  extended by org.decisiondeck.xmcda_oo.structure.Alternative
All Implemented Interfaces:
Comparable<Alternative>

public class Alternative
extends Object
implements Comparable<Alternative>

An alternative, or action, decision object, option, choice proposal, etc. Has a unique id (not null).

Objects of this type are immutable.


Constructor Summary
Alternative(int id)
          Builds an alternative with an integer id (which will also be available as string).
Alternative(String id)
          Builds an alternative (which is, by default, not fictitious).
 
Method Summary
 int compareTo(Alternative a2)
           
 boolean equals(Object obj)
           
 String getId()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Alternative

public Alternative(int id)
Builds an alternative with an integer id (which will also be available as string).

Parameters:
id - the id as an integer.

Alternative

public Alternative(String id)
Builds an alternative (which is, by default, not fictitious).

Parameters:
id - not null.
Method Detail

compareTo

public int compareTo(Alternative a2)
Specified by:
compareTo in interface Comparable<Alternative>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getId

public String getId()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.