scala.tools.scalap.scalax.rules

# Choice

###
Related Doc: package rules

#### trait Choice[-In, +Out, +A, +X] extends Rule[In, Out, A, X]

Source
  Rule.scala

Linear Supertypes
Rule[In, Out, A, X], (In) ⇒ Result[Out, A, X], AnyRef, Any
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. Choice
2. Rule
3. Function1
4. AnyRef
5. Any

Implicitly

1. by any2stringadd
2. by StringFormat
3. by Ensuring
4. by ArrowAssoc

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Abstract Value Members

1. #### abstract def choices: List[Rule[In, Out, A, X]]

2. #### abstract val factory: Rules

   Definition Classes
     Rule

### Concrete Value Members

1. #### final def !=(arg0: Any): Boolean

   Test two objects for inequality.

   Test two objects for inequality.

   returns

     `true` if !(this == that), false otherwise.

   Definition Classes
     AnyRef → Any

2. #### def !^[Y](fx2y: (X) ⇒ Y): Rule[In, Out, A, Y]

   Maps an Error

   Maps an Error

   Definition Classes
     Rule

3. #### final def ##(): Int

   Equivalent to `x.hashCode` except for boxed numeric types and `null`.

   Equivalent to `x.hashCode` except for boxed numeric types and `null`. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. For `null` returns a hashcode where `null.hashCode` throws a `NullPointerException`.

   returns

     a hash value consistent with ==

   Definition Classes
     AnyRef → Any

4. #### def +(other: String): String

   Implicit information
     This member is added by an implicit conversion from Choice[In, Out, A, X] to any2stringadd[Choice[In, Out, A, X]] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd

5. #### def -[In2 <: In](exclude: ⇒ Rule[In2, Any, Any, Any]): Rule[In2, Out, A, X]

   Definition Classes
     Rule

6. #### def ->[B](y: B): (Choice[In, Out, A, X], B)

   Implicit information
     This member is added by an implicit conversion from Choice[In, Out, A, X] to ArrowAssoc[Choice[In, Out, A, X]] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()

7. #### def -^[B](b: B): Rule[In, Out, B, X]

   Definition Classes
     Rule

8. #### def -~[Out2, B, X2 >: X](next: ⇒ Rule[Out, Out2, B, X2]): Rule[In, Out2, B, X2]

   Definition Classes
     Rule

9. #### def -~![Out2, B, X2 >: X](next: ⇒ Rule[Out, Out2, B, X2]): Rule[In, Out2, B, Any]

   Definition Classes
     Rule

10. #### def <~:[InPrev, B, X2 >: X](prev: ⇒ Rule[InPrev, In, (A) ⇒ B, X2]): Rule[InPrev, Out, B, X2]

    Apply the result of this rule to the function returned by the previous rule

    Apply the result of this rule to the function returned by the previous rule

    Definition Classes
      Rule

11. #### final def ==(arg0: Any): Boolean

    The expression `x == that` is equivalent to `if (x eq null) that eq null else x.equals(that)`.

    The expression `x == that` is equivalent to `if (x eq null) that eq null else x.equals(that)`.

    returns

      `true` if the receiver object is equivalent to the argument; `false` otherwise.

    Definition Classes
      AnyRef → Any

12. #### def >->[Out2, B, X2 >: X](fa2resultb: (A) ⇒ Result[Out2, B, X2]): Rule[In, Out2, B, X2]

    Definition Classes
      Rule

13. #### def >>[Out2, B, X2 >: X](fa2ruleb: (A) ⇒ (Out) ⇒ Result[Out2, B, X2]): Rule[In, Out2, B, X2]

    Definition Classes
      Rule

14. #### def >>&[B, X2 >: X](fa2ruleb: (A) ⇒ (Out) ⇒ Result[Any, B, X2]): Rule[In, Out, B, X2]

    Definition Classes
      Rule

15. #### def >>?[Out2, B, X2 >: X](pf: PartialFunction[A, Rule[Out, Out2, B, X2]]): Rule[In, Out2, B, X2]

    Definition Classes
      Rule

16. #### def >~>[Out2, B1, B2, B >: A, C, X2 >: X](f: (B1, B2) ⇒ (Out) ⇒ Result[Out2, C, X2])(implicit arg0: (B) ⇒ ~[B1, B2]): Rule[In, Out2, C, X2]

    >~>(f) is equivalent to >> { case b1 ~ b2 => f(b1, b2) }

    >~>(f) is equivalent to >> { case b1 ~ b2 => f(b1, b2) }

    Definition Classes
      Rule

17. #### def ??(pf: PartialFunction[A, Any]): Rule[In, Out, A, X]

    Definition Classes
      Rule

18. #### def ^-^[B1, B2 >: A, C](f: (B1, B2) ⇒ C): Rule[In, Out, (B1) ⇒ C, X]

    -(f) is equivalent to ^^ { b2 => b1 => f(b1, b2) }

    -(f) is equivalent to ^^ { b2 => b1 => f(b1, b2) }

    Definition Classes
      Rule

19. #### def ^^[B](fa2b: (A) ⇒ B): Rule[In, Out, B, X]

    Definition Classes
      Rule

20. #### def ^^?[B](pf: PartialFunction[A, B]): Rule[In, Out, B, X]

    Definition Classes
      Rule

21. #### def ^~>~^[B1, B2, B3, B >: A, C](f: (B1, B2, B3) ⇒ C)(implicit arg0: (B) ⇒ ~[B2, B3]): Rule[In, Out, (B1) ⇒ C, X]

    ~>~(f) is equivalent to ^^ { case b2 ~ b3 => b1 => f(b1, b2, b3) }

    ~>~(f) is equivalent to ^^ { case b2 ~ b3 => b1 => f(b1, b2, b3) }

    Definition Classes
      Rule

22. #### def ^~^[B1, B2, B >: A, C](f: (B1, B2) ⇒ C)(implicit arg0: (B) ⇒ ~[B1, B2]): Rule[In, Out, C, X]

    ~(f) is equivalent to ^^ { case b1 ~ b2 => f(b1, b2) }

    ~(f) is equivalent to ^^ { case b1 ~ b2 => f(b1, b2) }

    Definition Classes
      Rule

23. #### def ^~~^[B1, B2, B3, B >: A, C](f: (B1, B2, B3) ⇒ C)(implicit arg0: (B) ⇒ ~[~[B1, B2], B3]): Rule[In, Out, C, X]

    ~~(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 => f(b1, b2, b3) }

    ~~(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 => f(b1, b2, b3) }

    Definition Classes
      Rule

24. #### def ^~~~^[B1, B2, B3, B4, B >: A, C](f: (B1, B2, B3, B4) ⇒ C)(implicit arg0: (B) ⇒ ~[~[~[B1, B2], B3], B4]): Rule[In, Out, C, X]

    ~~~(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 ~ b4 => f(b1, b2, b3, b4) }

    ~~~(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 ~ b4 => f(b1, b2, b3, b4) }

    Definition Classes
      Rule

25. #### def ^~~~~^[B1, B2, B3, B4, B5, B >: A, C](f: (B1, B2, B3, B4, B5) ⇒ C)(implicit arg0: (B) ⇒ ~[~[~[~[B1, B2], B3], B4], B5]): Rule[In, Out, C, X]

    ~~~~(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 ~ b4 ~ b5 => f(b1, b2, b3, b4, b5) }

    ~~~~(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 ~ b4 ~ b5 => f(b1, b2, b3, b4, b5) }

    Definition Classes
      Rule

26. #### def ^~~~~~^[B1, B2, B3, B4, B5, B6, B >: A, C](f: (B1, B2, B3, B4, B5, B6) ⇒ C)(implicit arg0: (B) ⇒ ~[~[~[~[~[B1, B2], B3], B4], B5], B6]): Rule[In, Out, C, X]

    ~~~~~(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 ~ b4 ~ b5 ~ b6 => f(b1, b2, b3, b4, b5, b6) }

    ~~~~~(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 ~ b4 ~ b5 ~ b6 => f(b1, b2, b3, b4, b5, b6) }

    Definition Classes
      Rule

27. #### def ^~~~~~~^[B1, B2, B3, B4, B5, B6, B7, B >: A, C](f: (B1, B2, B3, B4, B5, B6, B7) ⇒ C)(implicit arg0: (B) ⇒ ~[~[~[~[~[~[B1, B2], B3], B4], B5], B6], B7]): Rule[In, Out, C, X]

    ~~~~~~(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 ~ b4 ~ b5 ~ b6 => f(b1, b2, b3, b4, b5, b6) }

    ~~~~~~(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 ~ b4 ~ b5 ~ b6 => f(b1, b2, b3, b4, b5, b6) }

    Definition Classes
      Rule

28. #### def andThen[A](g: (Result[Out, A, X]) ⇒ A): (In) ⇒ A

    Definition Classes
      Function1
    Annotations
      @unspecialized()

29. #### def apply(in: In): Result[Out, A, X]

    Definition Classes
      Choice → Function1

30. #### def as(name: String): Rule[In, Out, A, X] with Name

    Definition Classes
      Rule

31. #### final def asInstanceOf[T0]: T0

    Cast the receiver object to be of type `T0`.

    Cast the receiver object to be of type `T0`.

    Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression `1.asInstanceOf[String]` will throw a `ClassCastException` at runtime, while the expression `List(1).asInstanceOf[List[String]]` will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.

    returns

      the receiver object.

    Definition Classes
      Any
    Exceptions thrown

      `ClassCastException` if the receiver object is not an instance of the erasure of type `T0`.

32. #### def clone(): AnyRef

    Create a copy of the receiver object.

    Create a copy of the receiver object.

    The default implementation of the `clone` method is platform dependent.

    returns

      a copy of the receiver object.

    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @IntrinsicCandidate() @throws( ... )
    Note

      not specified by SLS as a member of AnyRef

33. #### def compose[A](g: (A) ⇒ In): (A) ⇒ Result[Out, A, X]

    Definition Classes
      Function1
    Annotations
      @unspecialized()

34. #### def ensuring(cond: (Choice[In, Out, A, X]) ⇒ Boolean, msg: ⇒ Any): Choice[In, Out, A, X]

    Implicit information
      This member is added by an implicit conversion from Choice[In, Out, A, X] to Ensuring[Choice[In, Out, A, X]] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring

35. #### def ensuring(cond: (Choice[In, Out, A, X]) ⇒ Boolean): Choice[In, Out, A, X]

    Implicit information
      This member is added by an implicit conversion from Choice[In, Out, A, X] to Ensuring[Choice[In, Out, A, X]] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring

36. #### def ensuring(cond: Boolean, msg: ⇒ Any): Choice[In, Out, A, X]

    Implicit information
      This member is added by an implicit conversion from Choice[In, Out, A, X] to Ensuring[Choice[In, Out, A, X]] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring

37. #### def ensuring(cond: Boolean): Choice[In, Out, A, X]

    Implicit information
      This member is added by an implicit conversion from Choice[In, Out, A, X] to Ensuring[Choice[In, Out, A, X]] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring

38. #### final def eq(arg0: AnyRef): Boolean

    Tests whether the argument (`that`) is a reference to the receiver object (`this`).

    Tests whether the argument (`that`) is a reference to the receiver object (`this`).

    The `eq` method implements an equivalence relation on non-null instances of `AnyRef`, and has three additional properties:

    - It is consistent: for any non-null instances `x` and `y` of type `AnyRef`, multiple invocations of `x.eq(y)` consistently returns `true` or consistently returns `false`.
    - For any non-null instance `x` of type `AnyRef`, `x.eq(null)` and `null.eq(x)` returns `false`.
    - `null.eq(null)` returns `true`.

    When overriding the `equals` or `hashCode` methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (`o1 eq o2`), they should be equal to each other (`o1 == o2`) and they should hash to the same value (`o1.hashCode == o2.hashCode`).

    returns

      `true` if the argument is a reference to the receiver object; `false` otherwise.

    Definition Classes
      AnyRef

39. #### def equals(arg0: Any): Boolean

    The equality method for reference types.

    The equality method for reference types. Default implementation delegates to `eq`.

    See also `equals` in scala.Any.

    returns

      `true` if the receiver object is equivalent to the argument; `false` otherwise.

    Definition Classes
      AnyRef → Any

40. #### def filter(f: (A) ⇒ Boolean): Rule[In, Out, A, X]

    Definition Classes
      Rule

41. #### def flatMap[Out2, B, X2 >: X](fa2ruleb: (A) ⇒ (Out) ⇒ Result[Out2, B, X2]): Rule[In, Out2, B, X2]

    Definition Classes
      Rule

42. #### def formatted(fmtstr: String): String

    Implicit information
      This member is added by an implicit conversion from Choice[In, Out, A, X] to StringFormat[Choice[In, Out, A, X]] performed by method StringFormat in scala.Predef.
    Definition Classes
      StringFormat
    Annotations
      @inline()

43. #### final def getClass(): Class[_]

    A representation that corresponds to the dynamic class of the receiver object.

    A representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

      a representation that corresponds to the dynamic class of the receiver object.

    Definition Classes
      AnyRef → Any
    Annotations
      @IntrinsicCandidate()
    Note

      not specified by SLS as a member of AnyRef

44. #### def hashCode(): Int

    The hashCode method for reference types.

    The hashCode method for reference types. See hashCode in scala.Any.

    returns

      the hash code value for this object.

    Definition Classes
      AnyRef → Any
    Annotations
      @IntrinsicCandidate()

45. #### final def isInstanceOf[T0]: Boolean

    Test whether the dynamic type of the receiver object is `T0`.

    Test whether the dynamic type of the receiver object is `T0`.

    Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression `1.isInstanceOf[String]` will return `false`, while the expression `List(1).isInstanceOf[List[String]]` will return `true`. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.

    returns

      `true` if the receiver object is an instance of erasure of type `T0`; `false` otherwise.

    Definition Classes
      Any

46. #### def map[B](fa2b: (A) ⇒ B): Rule[In, Out, B, X]

    Definition Classes
      Rule

47. #### def mapResult[Out2, B, Y](f: (Result[Out, A, X]) ⇒ Result[Out2, B, Y]): Rule[In, Out2, B, Y]

    Definition Classes
      Rule

48. #### final def ne(arg0: AnyRef): Boolean

    Equivalent to `!(this eq that)`.

    Equivalent to `!(this eq that)`.

    returns

      `true` if the argument is not a reference to the receiver object; `false` otherwise.

    Definition Classes
      AnyRef

49. #### final def notify(): Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Definition Classes
      AnyRef
    Annotations
      @IntrinsicCandidate()
    Note

      not specified by SLS as a member of AnyRef

50. #### final def notifyAll(): Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

    Wakes up all threads that are waiting on the receiver object's monitor.

    Definition Classes
      AnyRef
    Annotations
      @IntrinsicCandidate()
    Note

      not specified by SLS as a member of AnyRef

51. #### def orElse[In2 <: In, Out2 >: Out, A2 >: A, X2 >: X](other: ⇒ Rule[In2, Out2, A2, X2]): Rule[In2, Out2, A2, X2]

    Definition Classes
      Choice → Rule

52. #### def orError[In2 <: In]: Rule[In, Out, A, Any]

    Definition Classes
      Rule

53. #### final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
      AnyRef

54. #### def toString(): String

    Creates a String representation of this object.

    Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.

    returns

      a String representation of the object.

    Definition Classes
      Function1 → AnyRef → Any

55. #### final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

56. #### final def wait(arg0: Long): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

57. #### final def wait(): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

58. #### def |[In2 <: In, Out2 >: Out, A2 >: A, X2 >: X](other: ⇒ Rule[In2, Out2, A2, X2]): Rule[In2, Out2, A2, X2]

    Definition Classes
      Rule

59. #### def ~[Out2, B, X2 >: X](next: ⇒ Rule[Out, Out2, B, X2]): Rule[In, Out2, ~[A, B], X2]

    Definition Classes
      Rule

60. #### def ~![Out2, B, X2 >: X](next: ⇒ Rule[Out, Out2, B, X2]): Rule[In, Out2, ~[A, B], Any]

    Definition Classes
      Rule

61. #### def ~++[Out2, B >: A, X2 >: X](next: ⇒ Rule[Out, Out2, Seq[B], X2]): Rule[In, Out2, collection.immutable.List[B], X2]

    Definition Classes
      Rule

62. #### def ~-[Out2, B, X2 >: X](next: ⇒ Rule[Out, Out2, B, X2]): Rule[In, Out2, A, X2]

    Definition Classes
      Rule

63. #### def ~-![Out2, B, X2 >: X](next: ⇒ Rule[Out, Out2, B, X2]): Rule[In, Out2, A, Any]

    Definition Classes
      Rule

64. #### def ~>[Out2, B, X2 >: X](next: ⇒ Rule[Out, Out2, (A) ⇒ B, X2]): Rule[In, Out2, B, X2]

    Apply the result of this rule to the function returned by the next rule

    Apply the result of this rule to the function returned by the next rule

    Definition Classes
      Rule

65. #### def →[B](y: B): (Choice[In, Out, A, X], B)

    Implicit information
      This member is added by an implicit conversion from Choice[In, Out, A, X] to ArrowAssoc[Choice[In, Out, A, X]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
      ArrowAssoc

### Deprecated Value Members

1. #### def finalize(): Unit

   Called by the garbage collector on the receiver object when there are no more references to the object.

   Called by the garbage collector on the receiver object when there are no more references to the object.

   The details of when and if the `finalize` method is invoked, as well as the interaction between `finalize` and non-local returns and exceptions, are all platform dependent.

   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
   Deprecated

     (Since version ) see corresponding Javadoc for more information.

   Note

     not specified by SLS as a member of AnyRef

### Inherited from Rule[In, Out, A, X]

### Inherited from (In) ⇒ Result[Out, A, X]

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion any2stringadd from Choice[In, Out, A, X] to any2stringadd[Choice[In, Out, A, X]]

### Inherited by implicit conversion StringFormat from Choice[In, Out, A, X] to StringFormat[Choice[In, Out, A, X]]

### Inherited by implicit conversion Ensuring from Choice[In, Out, A, X] to Ensuring[Choice[In, Out, A, X]]

### Inherited by implicit conversion ArrowAssoc from Choice[In, Out, A, X] to ArrowAssoc[Choice[In, Out, A, X]]

### Ungrouped