code: @Override
  	public void removeListener(InvalidationListener listener) {
  		Objects.requireNonNull(listener);
  		if (0 < invalidationSize) {
  			if (size == 1) {
  				if (invalidationSize == 1 && this.listener.equals(listener)) {
  					sentinel = false;
  					this.listener = null;
  					invalidationSize--;
  					size--;
  				}
  			} else if (size == 2) {
  				Object[] l = (Object[]) this.listener;
  				if (listener.equals(l[0])) {
  					sentinel = false;
  					invalidationSize--;
  					size--;
  					this.listener = l[1];
  				} else if (invalidationSize == 2 && listener.equals(l[1])) {
  					sentinel = false;
  					invalidationSize--;
  					size--;
  					this.listener = l[0];
  				}
  			} else {
  				Object[] l = (Object[]) this.listener;
  
  				for (int i = 0; i < invalidationSize; i++) {
  					if (listener.equals(l[i])) {
  						if (sentinel) {
  							sentinel = false;
  							l = Arrays.copyOf(l, l.length);
  							this.listener = l;
  						}
  						if (i + 1 < size) {
  							System.arraycopy(l, i + 1, l, i, size - i - 1);
  						} else {
  							l[i] = null;
  						}
  						invalidationSize--;
  						size--;
  						break;
  					}
  				}
  			}
  		}
  	}
docs: {@inheritDoc}