code: public static boolean shouldEncodeWith(Encoder encoderToApply, EncodingState currentEncodingState) {
          if(isNoneEncoder(encoderToApply)) return false;
          if (currentEncodingState != null && currentEncodingState.getEncoders() != null) {
              for (Encoder encoder : currentEncodingState.getEncoders()) {
                  if (isPreviousEncoderSafeOrEqual(encoderToApply, encoder)) {
                      return false;
                  }
              }
          }
          return true;
      }
docs: Checks if encoder should be applied to a input with given encoding state
  
  @param encoderToApply
  the encoder to apply
  @param currentEncodingState
  the current encoding state
  @return true, if should encode