public void setPatterns(@Nullable List<Item> patterns) {
    this.patterns.clear();
    if (patterns != null) this.patterns.addAll(patterns);
    this.patterns.sort(ITEM_COMPARATOR);
    myCalculatedPatterns.drop();
  }
public void setPatterns(@Nullable List<Item> patterns)