add method

bool add(
  1. T value
)

Adds the given value to the set.

  • value: The element to add to the set.
  • Returns: true if the value was added, false if it was already in the set.

Implementation

bool add(T value) {
  switch (changeType) {
    case ChangeType.hard:
    case ChangeType.smart:
      return smartAdd(value);
    case ChangeType.silent:
      return silentAdd(value);
  }
}