コード例 #1
0
  public void validate(final IValidation results) {
    // Validate the well bore radius is positive.
    final int size = _size.get();
    if (size <= 0) {
      results.error(WELL_BORE_RADIUS, "Invalid bore radius: " + size);
    } else if (size == 0) {
      results.warning(WELL_BORE_RADIUS, "Zero bore radius specified.");
    }

    // Validate the well bore color is non-null.
    if (_color.isNull()) {
      results.error(WELL_BORE_COLOR, "No bore color specified.");
    }
  }