congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Either.ofRight
Code IndexAdd Tabnine to your IDE (free)

How to use
ofRight
method
in
org.kie.dmn.feel.util.Either

Best Java code snippets using org.kie.dmn.feel.util.Either.ofRight (Showing top 2 results out of 315)

origin: org.kie/kie-dmn-feel

public static PropertyValueResult ofValue(Object value) {
  return new PropertyValueResult(true, Either.ofRight(value));
}
origin: org.kie/kie-dmn-feel

/**
 * If valid input values are defined, check that all parameters match the respective valid inputs
 * @param ctx
 * @param params
 * @return
 */
private Either<FEELEvent, Object> actualInputsMatchInputValues(EvaluationContext ctx, Object[] params) {
  // check that all the parameters match the input list values if they are defined
  for( int i = 0; i < params.length; i++ ) {
    final DTInputClause input = inputs.get( i );
    // if a list of values is defined, check the the parameter matches the value
    if ( input.getInputValues() != null && ! input.getInputValues().isEmpty() ) {
      final Object parameter = params[i];
      boolean satisfies = input.getInputValues().stream().map( ut -> ut.apply( ctx, parameter ) ).filter( Boolean::booleanValue ).findAny().orElse( false );
      if ( !satisfies ) {
        String values = input.getInputValuesText();
        return Either.ofLeft(new InvalidInputEvent( FEELEvent.Severity.ERROR,
                       input.getInputExpression()+"='" + parameter + "' does not match any of the valid values " + values + " for decision table '" + getName() + "'.",
                       getName(),
                       null,
                       values )
            );
      }
    }
  }
  return Either.ofRight(true);
}
org.kie.dmn.feel.utilEitherofRight

Popular methods of Either

  • getOrElse
  • isLeft
  • isRight
  • <init>
  • cata
  • ofLeft

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • String (java.lang)
  • Path (java.nio.file)
  • Permission (java.security)
    Legacy security code; do not use.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now