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

org.aya.util.Ordering Maven / Gradle / Ivy

There is a newer version: 0.34.0
Show newest version
// Copyright (c) 2020-2024 Tesla (Yinsen) Zhang.
// Use of this source code is governed by the MIT license that can be found in the LICENSE.md file.
package org.aya.util;

import org.jetbrains.annotations.NotNull;

public enum Ordering {
  Gt(">="), Eq("=="), Lt("<=");

  public final @NotNull String symbol;

  Ordering(@NotNull String symbol) { this.symbol = symbol; }
  public @NotNull Ordering invert() {
    return switch (this) {
      case Gt -> Lt;
      case Eq -> Eq;
      case Lt -> Gt;
    };
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy