updateNumberOfRotations method
void
updateNumberOfRotations(
- int k,
- int occurrence
)
Implementation
void updateNumberOfRotations(int k, int occurrence) {
SupportPreconditions.checkState(
operatorIndex.containsKey(Rot90Op().runtimeType.toString()),
errorMessage: "The Rot90Op has not been added to the ImageProcessor.");
List<int> indexes = operatorIndex[Rot90Op().runtimeType.toString()]!;
SupportPreconditions.checkElementIndex(occurrence, indexes.length,
desc: "occurrence");
// The index of the Rot90Op to be replaced in operatorList.
int index = indexes[occurrence];
Rot90Op newRot = Rot90Op(k);
operatorList[index] = newRot;
}