setValue method

void setValue(
  1. double value
)

Implementation

void setValue(double value)
{
  if (cardinalDirection == CardinalDirection.North) {
    _box.top = value;
  }
  else if (cardinalDirection == CardinalDirection.East) {
    _box.right = value;
  }
  else if (cardinalDirection == CardinalDirection.South) {
    _box.bottom = value;
  }
  else if (cardinalDirection == CardinalDirection.West) {
    _box.left = value;
  }
  else {
    throw new IllegalStateException("BoxDimension.setValue() cannot support ordinal directions as reference to _box field.");
  }
}