data
Class Design

java.lang.Object
  extended by data.Design
All Implemented Interfaces:
java.io.Serializable

public class Design
extends java.lang.Object
implements java.io.Serializable

A Design represents a row in the DataSheet. It stores the values for each Parameter of the dataSheet.

See Also:
Serialized Form

Constructor Summary
Design(int id)
          Instantiates a new design.
 
Method Summary
 void evaluateBounds(Chart chart)
          Checks whether the design is within the bounds of all axes of the given Chart and updates the boolean field insideBounds accordingly.
 Cluster getCluster()
          Gets the cluster to which the design belongs.
 double getDoubleValue(Parameter param)
          Gets the numeric (double) representation of a value for a given parameter.
 int getId()
          Gets the id of the design.
 java.lang.String getStringValue(Parameter param)
          Gets the String representation of a value for a given parameter.
 boolean isActive(Chart chart)
          Checks whether the design is active.
 boolean isInsideBounds(Chart chart)
          Returns the value of the boolean field insideBounds.
 void removeParameter(Parameter param)
          Removes a parameter from the design
 void setActive(Filter filter, boolean active)
          Specifies whether the design is still active after applying a given Filter.
 void setCluster(Cluster cluster)
          Sets the cluster.
 void setId(int id)
          Sets the id of the design.
 void setValue(Parameter param, java.lang.String parameterValue)
          Sets the value for a given parameter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Design

public Design(int id)
Instantiates a new design.

Parameters:
id - the design id
Method Detail

setValue

public void setValue(Parameter param,
                     java.lang.String parameterValue)
Sets the value for a given parameter.

Parameters:
param - the parameter for which the value should be set
parameterValue - the parameter value

getDoubleValue

public double getDoubleValue(Parameter param)
Gets the numeric (double) representation of a value for a given parameter.

Parameters:
param - the parameter for which the value should be returned.
Returns:
the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter is unknown to the design.

getStringValue

public java.lang.String getStringValue(Parameter param)
Gets the String representation of a value for a given parameter.

Parameters:
param - the parameter for which the value should be returned.
Returns:
the string value for the given parameter
Throws:
java.lang.IllegalArgumentException - if the parameter is unknown to the design.

removeParameter

public void removeParameter(Parameter param)
Removes a parameter from the design

Parameters:
param - the parameter to be removed.
Throws:
java.lang.IllegalArgumentException - if the parameter is unknown to the design.

isActive

public boolean isActive(Chart chart)
Checks whether the design is active.

This check is carried out by looking up each filter in the activationMap

Parameters:
chart - the chart
Returns:
true, if the design is active

setActive

public void setActive(Filter filter,
                      boolean active)
Specifies whether the design is still active after applying a given Filter.

Parameters:
filter - the filter
active - the active

evaluateBounds

public void evaluateBounds(Chart chart)
Checks whether the design is within the bounds of all axes of the given Chart and updates the boolean field insideBounds accordingly.

Makes use of isInsideBounds for each Axis and returns false if isInsideBounds returns false for any Axis.

Parameters:
chart - the chart

isInsideBounds

public boolean isInsideBounds(Chart chart)
Returns the value of the boolean field insideBounds.

Parameters:
chart - the chart
Returns:
true, if the design is inside all axis bounds on the given chart.

getId

public int getId()
Gets the id of the design.

Returns:
the id

setId

public void setId(int id)
Sets the id of the design.

Parameters:
id - the new id

getCluster

public Cluster getCluster()
Gets the cluster to which the design belongs.

Returns:
the cluster

setCluster

public void setCluster(Cluster cluster)
Sets the cluster.

Parameters:
cluster - the new cluster to which the design belongs.