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

hydra.langs.tinkerpop.propertyGraph.Direction Maven / Gradle / Ivy

package hydra.langs.tinkerpop.propertyGraph;

import java.io.Serializable;

/**
 * The direction of an edge
 */
public abstract class Direction implements Serializable {
  public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/tinkerpop/propertyGraph.Direction");
  
  private Direction () {
  
  }
  
  public abstract  R accept(Visitor visitor) ;
  
  public interface Visitor {
    R visit(Out instance) ;
    
    R visit(In instance) ;
    
    R visit(Both instance) ;
  }
  
  public interface PartialVisitor extends Visitor {
    default R otherwise(Direction instance) {
      throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
    }
    
    default R visit(Out instance) {
      return otherwise((instance));
    }
    
    default R visit(In instance) {
      return otherwise((instance));
    }
    
    default R visit(Both instance) {
      return otherwise((instance));
    }
  }
  
  public static final class Out extends hydra.langs.tinkerpop.propertyGraph.Direction implements Serializable {
    public Out () {
    
    }
    
    @Override
    public boolean equals(Object other) {
      if (!(other instanceof Out)) {
        return false;
      }
      Out o = (Out) (other);
      return true;
    }
    
    @Override
    public int hashCode() {
      return 0;
    }
    
    @Override
    public  R accept(Visitor visitor) {
      return visitor.visit(this);
    }
  }
  
  public static final class In extends hydra.langs.tinkerpop.propertyGraph.Direction implements Serializable {
    public In () {
    
    }
    
    @Override
    public boolean equals(Object other) {
      if (!(other instanceof In)) {
        return false;
      }
      In o = (In) (other);
      return true;
    }
    
    @Override
    public int hashCode() {
      return 0;
    }
    
    @Override
    public  R accept(Visitor visitor) {
      return visitor.visit(this);
    }
  }
  
  public static final class Both extends hydra.langs.tinkerpop.propertyGraph.Direction implements Serializable {
    public Both () {
    
    }
    
    @Override
    public boolean equals(Object other) {
      if (!(other instanceof Both)) {
        return false;
      }
      Both o = (Both) (other);
      return true;
    }
    
    @Override
    public int hashCode() {
      return 0;
    }
    
    @Override
    public  R accept(Visitor visitor) {
      return visitor.visit(this);
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy