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

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

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

origin: org.kie/kie-dmn-feel

public static PropertyValueResult notDefined() {
  return new PropertyValueResult(false, Either.ofLeft(new UnsupportedOperationException("Property was not defined.")));
}
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);
}
origin: org.kie/kie-dmn-feel

} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
  e.printStackTrace();
  return PropertyValueResult.of(Either.ofLeft(e));
org.kie.dmn.feel.utilEitherofLeft

Popular methods of Either

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

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 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