Method for enabling/disabling specified parser features
(check {@link BsonParser.Feature} for list of features)
@param f the feature to enable or disable
@param state true if the feature should be enabled, false otherwise
@return this BsonFactory
777538
public final BsonFactory configure(BsonParser.Feature f, boolean state) {
		if (state) {
			return enable(f);
		}
		return disable(f);
	}
525586
public <B> State<S, B> mapState(Fn1<? super Tuple2<A, S>, ? extends Product2<B, S>> fn) {
        return state(s -> fn.apply(run(s)));
    }
670846
void addState(State<S, L> state) {
        ElementReference ref = states.referencedAdd(state);
        state.setBlockReference(ref);
        state.setBlock(this);
    }
1149411
public static boolean requiresParentheses(ExpressionTree expression, VisitorState state) {
    switch (expression.getKind()) {
      case IDENTIFIER:
      case MEMBER_SELECT:
      case METHOD_INVOCATION:
      case ARRAY_ACCESS:
      case PARENTHESIZED:
      case NEW_CLASS:
      case MEMBER_REFERENCE:
      case LAMBDA_EXPRESSION:
        return false;
      default: // continue below
    }
    if (expression instanceof LiteralTree) {
      if (!isSameType(getType(expression), state.getSymtab().stringType, state)) {
        return false;
      }
      // TODO(b/112139121): work around for javac's too-early constant string folding
      return ErrorProneTokens.getTokens(state.getSourceForNode(expression), state.context).stream()
          .anyMatch(t -> t.kind() == TokenKind.PLUS);
    }
    if (expression instanceof UnaryTree) {
      return false;
    }
    return true;
  }
768387
public CmsStateBean parseState(String state, String baseOU) {

        String path = baseOU;
        String filter = "";
        I_CmsOuTreeType type = CmsOuTreeType.OU;
        CmsUUID groupId = null;
        List<String> fields = CmsStringUtil.splitAsList(state, STATE_SEPERATOR);
        if (!fields.isEmpty()) {
            if (fields.size() > 1) {
                path = fields.get(1);
                //Make sure to only show OUs which are under baseOU
                if (path.equals("") | !path.startsWith(baseOU)) {
                    path = baseOU;
                }
            }
            for (I_CmsOuTreeType ty : getTreeTypeProvider().getTreeTypes()) {
                if (fields.get(0).equals(ty.getId())) {
                    type = ty;
                }
            }
            if (fields.size() > 2) {
                if (!CmsStringUtil.isEmptyOrWhitespaceOnly(fields.get(2))) {
                    groupId = new CmsUUID(fields.get(2));
                }
            }
            if (fields.size() > 3) {
                filter = fields.get(3);
            }
        }
        return new CmsStateBean(path, type, groupId, filter);
    }
685592
function (parser, compiler, actions, scope, state) {
	this.state    = state || {};
	this.scope    = scope;
	this.parser   = parser;
	this.actions  = actions;
	this.compiler = compiler;
}
991153
public final <To> Parser<To> next(
      final Function<? super T, ? extends Parser<? extends To>> map) {
    return new Parser<To>() {
      @Override boolean apply(ParseContext ctxt) {
        return Parser.this.apply(ctxt) && runNext(ctxt);
      }
      @Override public String toString() {
        return map.toString();
      }
      private boolean runNext(ParseContext state) {
        T from = Parser.this.getReturn(state);
        return map.apply(from).apply(state);
      }
    };
  }
744444
private void setState(final RunnableProcessState newState) {
    if (!this.state.isLegal(newState)) {
      throw new IllegalStateException("Transition from " + this.state + " to " + newState + " is illegal");
    }
    this.state = newState;
  }
690144
public JsonGenerator configure(Feature f, boolean state)
    {
        if (state) {
            enable(f);
        } else {
            disable(f);
        }
        return this;
    }
333498
public int setState(boolean state, boolean bDisplayOption, int iMoveMode)
    {       // Must be overidden
        if (this.getNextConverter() != null)
            return this.getNextConverter().setState(state, bDisplayOption, iMoveMode);
        else
            return super.setState(state, bDisplayOption, iMoveMode);
    }
473070
public <T> T get(Class<T> stateType) {
		Map<Class<?>, Object> states = getStates();
		T value = getState( states, stateType );

		if ( value == null ) {
			throw new IllegalArgumentException( "Accessing state of type not enabled: " + stateType );
		}

		return value;
	}
766576
public static boolean supports(final Feature f, final int lv) {
    final EnumSet<Feature> set =  map.get(lv);
    return set != null && set.contains(f);
  }
28150
Observable<ComapiResult<String>> doCreateFbOptInState(@NonNull final String token) {
        return wrapObservable(service.createFbOptInState(AuthManager.addAuthPrefix(token), apiSpaceId, new Object()).map(mapToComapiResult()), log, "Creating fb opt in state.");
    }
482409
public static <E> LogicExpression<E> compile(final String input,
            final Function<String, Arg<E>> factoryDelegate) {
        return new LogicExpressionParser<E>() {
            @Override
            public Arg<E> factory(String argument) {
                return factoryDelegate.apply(argument);
            }
        }.parse(input);
    }
1343054
@SuppressWarnings ("unchecked")
  public void deserializeState (@Nonnull final Serializable aState)
  {
    if (!(aState instanceof Map))
      throw new IllegalArgumentException ("Serialized state needs to be of type [java.util.Map]");
    m_aAttributes.putAll ((Map <String, Object>) aState);
  }
839906
public int setState(boolean state, boolean bDisplayOption, int iMoveMode)
    {       // Must be overidden
        m_bSetData = true;  // Make sure getNextConverter is called correctly (if it is called).
        int iErrorCode = super.setState(state, bDisplayOption, iMoveMode);
        m_bSetData = false;
        return iErrorCode;
    }
489494
private void setSelectionStateOfAll(State state)
    {
        Objects.requireNonNull(state, "The state may not be null");
        List<Object> allNodes = JTrees.getAllNodes(getModel());
        for (Object node : allNodes)
        {
            setSelectionState(node, state);
        }
    }