Packages

object Case

Factory object for creating Cases.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Case
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[Before <: Context, After <: Context, Value, Input](context: Before, after: After)(conversion: (Value) ⇒ Input): Case[(Before, After), Value, Input]

    Creates a new Case for instances of type Value, specifying the context in which that type may be substituted, and after context.

    Creates a new Case for instances of type Value, specifying the context in which that type may be substituted, and after context.

    For example, the case defined by,

    Case(Param, AfterParam) { (p: Int) => s"'$p'" }
    

    handles substitutions at a hole with a hypothetical Param Context of integer values, converting them to a string by wrapping them in single-quotes, and specifying the hypothetical AfterParam Context for the continuation of parsing, following the substitution.

    For any Interpolator which parses the interpolated string, allows substitutions, and uses multiple Contexts, the after value is important in determining how making the substitution changes the parse context. For example, considering the hole in,

    json"""{ "key": $value }"""
    

    prior to the substitution of value, the Context would be a value representing a position where any JSON value may be substituted, but following the substitution, i.e. after the JSON value has been substituted, the parsing context has changed, as we would only permit a comma (followed by more key/value pairs), or a closing brace; nothing else is acceptable. We would therefore specify an after Context which represents this state.

    Before

    the type (typically inferred) of the Context before the transition

    After

    the type (typically inferred) of the Context after the transition

    Value

    the type for which this Case handles conversion

    Input

    the common input type to which all substitutions are converted, often (but not always) String

    context

    the Context before the substitution

    after

    the Context after the substitution

    conversion

    the conversion function to the Interpolator's common input type

    returns

    a new Case for handling embedding a Value in the specified Context

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped