code: @NonNull
      public Visibility setMode(@VisibilityMode int mode) {
          if ((mode & ~(MODE_IN | MODE_OUT)) != 0) {
              throw new IllegalArgumentException("Only MODE_IN and MODE_OUT flags are allowed");
          }
          mMode = mode;
          return this;
      }
docs: Changes the transition to support appearing and/or disappearing Views, depending
  on <code>mode</code>.
  
  @param mode The behavior supported by this transition, a combination of
  {@link #MODE_IN} and {@link #MODE_OUT}.
  @return This Visibility object.
  @attr ref android.R.styleable#VisibilityTransition_transitionVisibilityMode