isSet method

bool isSet(
  1. int fieldID
)
override

Check if a field is currently set or unset, using the fieldId.

Implementation

bool isSet(int fieldID) {
  switch (fieldID) {
    case SECONDS:
      return isSetSeconds();
    case MICROSECONDS:
      return isSetMicroseconds();
    case MONTHS:
      return isSetMonths();
    default:
      throw new ArgumentError("Field $fieldID doesn't exist!");
  }
}