ReactionGroup Class Reference

A grouping of several similar Reactions. More...

Inheritance diagram for ReactionGroup:

Inheritance graph
[legend]

Collaboration diagram for ReactionGroup:

Collaboration graph
[legend]

List of all members.


Public Member Functions

 ReactionGroup ()
 Default constructor.
 ReactionGroup (String name)
 Constructor with a name.
String getName ()
 Get name of reaction group.
ReactionGroup setName (String name)
 Set name of reaction group.
String getComment ()
 Get comment.
ReactionGroup setComment (String comment)
 Set comment.
Set< ReactiongetReactions ()
ReactionGroup setReactions (Set< Reaction > reactions)
ReactionGroup addReaction (Reaction reaction)
ReactionGroup removeReaction (Reaction reaction)
String toString ()
 Default String representation: declares that method is not properly defined by default.

Package Functions

Logger log ()
 Neat method to allow every class to get hold of a custom-named Logger.

Detailed Description

A grouping of several similar Reactions.

Author:
Andy Buckley
Version:
Date
Revision

Definition at line 16 of file ReactionGroup.java.


Constructor & Destructor Documentation

ReactionGroup (  ) 

Default constructor.

Definition at line 42 of file ReactionGroup.java.

00042 {}

ReactionGroup ( String  name  ) 

Constructor with a name.

Definition at line 45 of file ReactionGroup.java.

00045                                       {
00046         setName(name);
00047     }


Member Function Documentation

String getName (  ) 

Get name of reaction group.

Definition at line 54 of file ReactionGroup.java.

00054                             {
00055         return _name;
00056     }

ReactionGroup setName ( String  name  ) 

Set name of reaction group.

Definition at line 58 of file ReactionGroup.java.

00058                                               {
00059         _name = name;
00060         return this;
00061     }

String getComment (  ) 

Get comment.

Definition at line 65 of file ReactionGroup.java.

00065                                {
00066         return _comment;
00067     }

ReactionGroup setComment ( String  comment  ) 

Set comment.

Definition at line 69 of file ReactionGroup.java.

00069                                                     {
00070         _comment = comment;
00071         return this;
00072     }

Set<Reaction> getReactions (  ) 

Definition at line 76 of file ReactionGroup.java.

Referenced by Reaction.addReactionGroup(), and Reaction.removeReactionGroup().

00076                                         {
00077         return _reactions;
00078     }

ReactionGroup setReactions ( Set< Reaction reactions  ) 

Definition at line 79 of file ReactionGroup.java.

00079                                                                {
00080         for (Reaction r : getReactions()) removeReaction(r);
00081         for (Reaction r : reactions) addReaction(r);
00082         return this;
00083     }

ReactionGroup addReaction ( Reaction  reaction  ) 

Definition at line 84 of file ReactionGroup.java.

References Reaction.getReactionGroups().

00084                                                         {
00085         if (reaction != null) {
00086             reaction.getReactionGroups().add(this);
00087             getReactions().add(reaction);
00088         } else {
00089             log().warn("Tried to add a null reaction to a reaction group");
00090         }
00091         return this;
00092     }

ReactionGroup removeReaction ( Reaction  reaction  ) 

Definition at line 93 of file ReactionGroup.java.

References Reaction.getReactionGroups().

00093                                                            {
00094         if (reaction != null) {
00095             reaction.getReactionGroups().remove(this);
00096             getReactions().remove(reaction);
00097         } else {
00098             log().warn("Tried to remove a null reaction from a reaction group");
00099         }
00100         return this;
00101     }

Logger log (  )  [package, inherited]

Neat method to allow every class to get hold of a custom-named Logger.

Definition at line 14 of file Storeable.java.

Referenced by Uncertainty.compareTo(), Reference.compareTo(), PointError.compareTo(), Modification.compareTo(), Experiment.compareTo(), DatasetError.compareTo(), AxisError.compareTo(), Data.makeExample(), Data.makeExampleDataset(), Data.makeExampleExperiment(), Data.makeExamplePaper(), Data.makeExampleXAxes(), Data.makeExampleYAxes(), DatasetError.setNormType(), and Uncertainty.toString().

00014                  {
00015         return Logger.getLogger(this.getClass());
00016     }

String toString (  )  [inherited]

Default String representation: declares that method is not properly defined by default.

Reimplemented in Axis, Bin, Data, Dataset, Experiment, Modification, Paper, Particle, Point, Property, Reaction, Reference, Uncertainty, XAxis, and YAxis.

Definition at line 19 of file Storeable.java.

00019                              {
00020         StringBuffer s = new StringBuffer();
00021         s.append(this.getClass().getName() + ".toString() is not overloaded.");
00022         return s.toString();
00023     }


The documentation for this class was generated from the following file:
Generated on Thu Sep 20 11:41:39 2007 by  doxygen 1.5.3