Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## mro.util.measures
Class MeasureGroup

    java.lang.Object
      mro.util.measures.Measure
          mro.util.measures.MeasureGroup

Direct Known Subclasses:
  Measures

    public class MeasureGroup

extends Measure

A group of Measure:s for the purpose of organization.

Field Summary
`private java.util.Vector<Measure>` | `measureVector` The vector of Measures in the order the user wants it.
`private java.util.HashMap<java.lang.String,MeasureGroup>` | `nameMeasureGroupMap` MeasureGroup:s.
`private java.util.HashMap<java.lang.String,Measure>` | `nameMeasureMap` All Measure:s.

Fields inherited from class mro.util.measures.Measure
`description, iogrelative, name, roundFloatToNumOfDecimals, roundValue, stamp, value`

Constructor Summary
`MeasureGroup()`
`MeasureGroup(MeasureGroup mg)` Copy Constructor.
`MeasureGroup(java.lang.String name)`

Method Summary
`void` | `addMeasure(Measure m)` Adds a Measure of any kind.
`void` | `addMeasureVector(java.util.Vector mv)`
`MeasureGroup` | `constructAverageMeasures(MeasureGroup mg)` Constructs a new MeasureGroup with AverageMeasure:s from the Measure:s in this and the specified MeasureGroup.
`private MeasureGroup` | `constructAverageMeasuresRecuresively(MeasureGroup mg1, MeasureGroup mg2)`
`static Measure` | `copy(Measure m)` Deep copy.
`MeasureGroup` | `divide(MeasureGroup other)`
`Measure` | `getMeasure(java.lang.String name)` Returns a `Measure` with the specified name.
`MeasureGroup` | `getMeasureGroup(java.lang.String measureGroupName)` Returns a `MeasureGroup` with the specified name.
`java.util.Vector<Measure>` | `getMeasureVector()` Sets a Measure with the given name to the given value.
`java.lang.String` | `getName()`
`private java.util.HashMap<java.lang.String,Measure>` | `makeNameMeasureMap(java.util.Vector<Measure> vec)`
`void` | `printXML(java.io.PrintWriter pw)`
`MeasureGroup` | `relative(MeasureGroup other)`
`private void` | `setAllMeasuresStampsRecursively(Measure m, java.lang.String stamp)`
`void` | `setAllMeasuresStampsRecursively(java.lang.String stamp)` Sets all Measure "stamps" recursively.
`void` | `setName(java.lang.String name)`
`int` | `size()`
`MeasureGroup` | `subtract(MeasureGroup other)`
`java.lang.String` | `toString()`

Methods inherited from class mro.util.measures.Measure
`difference, divide, getDescription, getRelativeIObjectGroup, getStamp, getValue, normDifference, setDescription, setStamp, setValue, subtract`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### nameMeasureMap

    private java.util.HashMap<java.lang.String,Measure> nameMeasureMap

  All Measure:s. No MeasureGroup:s.

### nameMeasureGroupMap

    private java.util.HashMap<java.lang.String,MeasureGroup> nameMeasureGroupMap

  MeasureGroup:s. Only top-level MeasureGroups.

### measureVector

    private java.util.Vector<Measure> measureVector

  The vector of Measures in the order the user wants it. Only top-level Measure:s and MeasureGroup:s.

Constructor Detail

### MeasureGroup

    MeasureGroup()

### MeasureGroup

    public MeasureGroup(java.lang.String name)

### MeasureGroup

    public MeasureGroup(MeasureGroup mg)
                 throws MeasureNameConflictException

  Copy Constructor. Deep. Makes copies of all Measure:s of all kinds.

  Throws:
    `MeasureNameConflictException`

Method Detail

### copy

    public static Measure copy(Measure m)
                        throws MeasureNameConflictException

  Deep copy. Makes copies of all Measure:s of all kinds.

  Throws:
    `MeasureNameConflictException`

### addMeasureVector

    public void addMeasureVector(java.util.Vector mv)
                          throws MeasureNameConflictException

  Throws:
    `MeasureNameConflictException`

### addMeasure

    public void addMeasure(Measure m)
                    throws MeasureNameConflictException

  Adds a Measure of any kind.

  Throws:
    `MeasureNameConflictException`

### relative

    public MeasureGroup relative(MeasureGroup other)

### subtract

    public MeasureGroup subtract(MeasureGroup other)

### divide

    public MeasureGroup divide(MeasureGroup other)

### constructAverageMeasures

    public MeasureGroup constructAverageMeasures(MeasureGroup mg)
                                          throws MeasureNameConflictException

  Constructs a new MeasureGroup with AverageMeasure:s from the Measure:s in this and the specified MeasureGroup. Deep.

  Throws:
    `MeasureNameConflictException`

### makeNameMeasureMap

    private java.util.HashMap<java.lang.String,Measure> makeNameMeasureMap(java.util.Vector<Measure> vec)

### constructAverageMeasuresRecuresively

    private MeasureGroup constructAverageMeasuresRecuresively(MeasureGroup mg1,
                                                              MeasureGroup mg2)
                                                       throws MeasureNameConflictException

  Throws:
    `MeasureNameConflictException`

### getMeasureGroup

    public MeasureGroup getMeasureGroup(java.lang.String measureGroupName)

  Returns a `MeasureGroup` with the specified name. null if it doesn't exist.

### getMeasure

    public Measure getMeasure(java.lang.String name)

  Returns a `Measure` with the specified name. null if it doesn't exist.

### getMeasureVector

    public java.util.Vector<Measure> getMeasureVector()

  Sets a Measure with the given name to the given value. If the Measure is not in the measures a `MeasureNotFoundException` is thrown.

### size

    public int size()

### setName

    public void setName(java.lang.String name)

### getName

    public java.lang.String getName()

  Overrides:
    `getName` in class `Measure`

### setAllMeasuresStampsRecursively

    public void setAllMeasuresStampsRecursively(java.lang.String stamp)

  Sets all Measure "stamps" recursively. Use with caution.

### setAllMeasuresStampsRecursively

    private void setAllMeasuresStampsRecursively(Measure m,
                                                 java.lang.String stamp)

### printXML

    public void printXML(java.io.PrintWriter pw)
                  throws java.io.IOException

  Overrides:
    `printXML` in class `Measure`
  Throws:
    `java.io.IOException`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD