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

com.accenture.testing.bdd.comparison.Operator Maven / Gradle / Ivy

Go to download

A simple to use, easy to integrate, BDD library for API and microservices development.

The newest version!
package com.accenture.testing.bdd.comparison;

public enum Operator {

  /** In parameter equals match parameter. */
  only {

    @Override
    public boolean calc(int in, int match) {
      return in == match;
    }

    @Override
    public String toString() {
      return "==";
    }
  },
  /** In parameter is greater than or equals match parameter. */
  at_least {

    @Override
    public boolean calc(int in, int match) {
      return in >= match;
    }

    @Override
    public String toString() {
      return ">=";
    }
  },
  /** In parameter is less than or equals match parameter. */
  at_most {

    @Override
    public boolean calc(int in, int match) {
      return in <= match;
    }

    @Override
    public String toString() {
      return "<=";
    }
  },
  /** In parameter is greater than match parameter. */
  more_than {

    @Override
    public boolean calc(int in, int match) {
      return in > match;
    }

    @Override
    public String toString() {
      return ">";
    }
  },
  /** In parameter is less than match parameter. */
  less_than {

    @Override
    public boolean calc(int in, int match) {
      return in < match;
    }

    @Override
    public String toString() {
      return "<";
    }
  };

  /**
   * confirm the difference between two numbers.
   *
   * @param in the number to compare
   * @param match the number to compare against
   * @return the result
   */
  public boolean calc(int in, int match) {
    return false;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy