ObservableGroup Class Reference

A grouping of several similar Observables. More...

Inheritance diagram for ObservableGroup:

Inheritance graph
[legend]

Collaboration diagram for ObservableGroup:

Collaboration graph
[legend]

List of all members.


Public Member Functions

 ObservableGroup ()
 Default constructor.
 ObservableGroup (String name)
 Named constructor.
String getName ()
 Get name of observable class.
ObservableGroup setName (String name)
 Set name of observable class.
String getComment ()
 Get comment.
ObservableGroup setComment (String comment)
 Set comment.
Set< ObservablegetObservables ()
ObservableGroup setObservables (Set< Observable > observables)
ObservableGroup addObservable (Observable observable)
ObservableGroup removeObservable (Observable observable)
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 Observables.

Author:
Andy Buckley
Version:
Date
Revision

Definition at line 16 of file ObservableGroup.java.


Constructor & Destructor Documentation

ObservableGroup (  ) 

Default constructor.

Definition at line 41 of file ObservableGroup.java.

00041 {}

ObservableGroup ( String  name  ) 

Named constructor.

Definition at line 44 of file ObservableGroup.java.

00044                                         {
00045         setName(name);
00046     }


Member Function Documentation

String getName (  ) 

Get name of observable class.

Definition at line 52 of file ObservableGroup.java.

00052                             {
00053         return _name;
00054     }

ObservableGroup setName ( String  name  ) 

Set name of observable class.

Definition at line 56 of file ObservableGroup.java.

00056                                                 {
00057         _name = name;
00058         return this;
00059     }

String getComment (  ) 

Get comment.

Definition at line 62 of file ObservableGroup.java.

00062                                {
00063         return _comment;
00064     }

ObservableGroup setComment ( String  comment  ) 

Set comment.

Definition at line 66 of file ObservableGroup.java.

00066                                                       {
00067         _comment = comment;
00068         return this;
00069     }

Set<Observable> getObservables (  ) 

Definition at line 73 of file ObservableGroup.java.

Referenced by Observable.addObservableGroup(), and Observable.removeObservableGroup().

00073                                             {
00074         return _observables;
00075     }

ObservableGroup setObservables ( Set< Observable observables  ) 

Definition at line 76 of file ObservableGroup.java.

00076                                                                        {
00077         for (Observable o : getObservables()) removeObservable(o);
00078         for (Observable o : observables) addObservable(o);
00079         return this;
00080     }

ObservableGroup addObservable ( Observable  observable  ) 

Definition at line 81 of file ObservableGroup.java.

References Observable.getObservableGroups().

00081                                                                 {
00082         if (observable != null) {
00083             observable.getObservableGroups().add(this);
00084             getObservables().add(observable);
00085         } else {
00086             log().warn("Tried to add a null observable to an observable group");
00087         }
00088         return this;
00089     }

ObservableGroup removeObservable ( Observable  observable  ) 

Definition at line 90 of file ObservableGroup.java.

References Observable.getObservableGroups().

00090                                                                    {
00091         if (observable != null) {
00092             observable.getObservableGroups().remove(this);
00093             getObservables().remove(observable);
00094         } else {
00095             log().warn("Tried to remove a null observable from an observable group");
00096         }
00097         return this;
00098     }

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