package com.bio4j.angulillos;

interface HasFromArity { Arity fromArity(); }
interface HasToArity   { Arity   toArity(); }

/* ### Arities */
public enum Arity {

  One,        // Exactly one: X
  AtMostOne,  // One or none: Optional[X]
  AtLeastOne, // Non-empty list: NEList[X]
  Any;        // Usual list: List[X]

  /* #### In-arities */
  public interface FromAtLeastOne extends FromAny, HasFromArity { default Arity fromArity() { return Arity.One; } }
  public interface FromOne        extends FromAtLeastOne, FromAtMostOne, HasFromArity { default Arity fromArity() { return Arity.AtMostOne; } }
  public interface FromAtMostOne  extends FromAny, HasFromArity { default Arity fromArity() { return Arity.AtLeastOne; } }
  public interface FromAny        extends HasFromArity { default Arity fromArity() { return Arity.Any; } }

  /* #### Out-arities */
  public interface ToAtLeastOne extends ToAny, HasToArity { default Arity toArity() { return Arity.One; } }
  public interface ToOne        extends ToAtLeastOne, ToAtMostOne, HasToArity { default Arity toArity() { return Arity.AtMostOne; } }
  public interface ToAtMostOne  extends ToAny, HasToArity { default Arity toArity() { return Arity.AtLeastOne; } }
  public interface ToAny        extends HasToArity { default Arity toArity() { return Arity.Any; } }
}

@@ -434,32 +434,39 @@
  %7B return Arity.
+AtLeast
 One; %7D %7D%0A  publi
@@ -579,38 +579,32 @@
  %7B return Arity.
-AtMost
 One; %7D %7D%0A  publi
@@ -697,35 +697,34 @@
  return Arity.At
-Lea
+Mo
 stOne; %7D %7D%0A  pub
@@ -942,32 +942,39 @@
  %7B return Arity.
+AtLeast
 One; %7D %7D%0A  publi
@@ -1077,38 +1077,32 @@
  %7B return Arity.
-AtMost
 One; %7D %7D%0A  publi
@@ -1187,35 +1187,34 @@
  return Arity.At
-Lea
+Mo
 stOne; %7D %7D%0A  pub

fix arity interfaces returning the wrong arity enum value