All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bpodgursky.jbool_expressions.rules.SimplifyNExpression Maven / Gradle / Ivy

There is a newer version: 8.1.2
Show newest version
package com.bpodgursky.jbool_expressions.rules;

import com.bpodgursky.jbool_expressions.*;
import com.google.common.collect.Lists;

import java.util.ArrayList;
import java.util.List;

public class SimplifyNExpression extends Rule, K> {

  @Override
  public Expression applyInternal(NExpression input) {

    if(input.expressions.length == 1){
      return input.expressions[0];
    }

    return input;
  }

  @Override
  protected boolean isApply(Expression input) {
    return input instanceof NExpression;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy