setDepth method

void setDepth(
  1. int position,
  2. int depthVal
)

Implementation

void setDepth(int position, int depthVal) {
  if (depth[position] != -999) {
//      if (depth[position] != depthVal) {
//        Debug.print(this);
//      }
    if (depth[position] != depthVal) {
      throw new TopologyException(
          "assigned depths do not match ${getCoordinate()}");
    }
    //Assert.isTrue(depth[position] == depthVal, "assigned depths do not match at " + getCoordinate());
  }
  depth[position] = depthVal;
}