isSequentialTo method

bool isSequentialTo(
  1. PhoneNumber nextNumber
)

Returns true if nextNumber is the next number (numerically) after this number

PhoneParser.parseRaw('61383208100').isSequentialTo( PhoneParser.parseRaw('61383208101')) == true;

Implementation

bool isSequentialTo(PhoneNumber nextNumber) {
  return ((this + 1) == nextNumber);
}