code: public void setFilter(UnicodeFilter filter) {
          if (filter == null) {
              this.filter = null;
          } else {
              try {
                  // fast high-runner case
                  this.filter = new UnicodeSet((UnicodeSet)filter).freeze();
              } catch (Exception e) {
                  this.filter = new UnicodeSet();
                  filter.addMatchSetTo(this.filter);
                  this.filter.freeze();
              }
          }
      }
docs: Changes the filter used by this transliterator.  If the filter
  is set to <tt>null</tt> then no filtering will occur.
  
  <p>Callers must take care if a transliterator is in use by
  multiple threads.  The filter should not be changed by one
  thread while another thread may be transliterating.