Trait

scala.meta.tql

CollectionLikeUI

Related Doc: package tql

Permalink

trait CollectionLikeUI[T] extends AnyRef

This trait allows to easily write simple traversals. Instead of writing: t : T val x = topDown(collect{...}) val result = x(t).result We can wirte instead t.collect{...}

topDownBreak(focus{..} ~> topDown{transform{...}}) (t) becomes t.topDownBreak.focus{..}.topDown.transform{..} Which is essentially easier to read and to write

The drawbacks:

/!\ Beware: this code contains a lot of implcit magic tricks

Self Type
CollectionLikeUI[T] with Combinators[T] with Traverser[T] with SyntaxEnhancer[T]
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CollectionLikeUI
  2. AnyRef
  3. 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

Type Members

  1. abstract class DelayedMeta extends AnyRef

    Permalink

    Abstract class used to delay delay the time when the type parameter of a meta combinator is decided.

    Abstract class used to delay delay the time when the type parameter of a meta combinator is decided. Anonymous functions can't take type parameter, so this ugly stuff is required

  2. class Evaluator[V] extends AnyRef

    Permalink

    Allows to call 'combinators' directly on T For documentation see Combinators.scala

  3. class EvaluatorAndThen[V, +A] extends AnyRef

    Permalink

    Evaluator at which will be applied m andThen the traversal strategy defined in 'meta'

  4. class EvaluatorAndThenCollector[V, C[_]] extends AnyRef

    Permalink
  5. class EvaluatorCollector[V, C[_]] extends AnyRef

    Permalink
  6. class EvaluatorMeta[V] extends AnyRef

    Permalink

    Evaluator at which will be applied the traversal strategy defined in 'meta'

  7. class EvaluatorMetaCollector[V, C[_]] extends AnyRef

    Permalink
  8. class ForceResult[V, A, R] extends AnyRef

    Permalink

    This has to be outside of EvaluatorAndThen because of covarience stuff it is not possible to write def force(implicit x: Monoid[A]) = ...inside EvaluatorAndThen[A] We should write def force[B >: A](implicit x: Monoid[B]) but Monoid should be made contravarient in A, which is not possible (in part because it is not logical and because contravarient stuff does not work well with implicits)

  9. trait MatcherApply[A, R, V, L] extends AnyRef

    Permalink

    Make it possible to use the collection like ui api inside different structures A := Result of the Matcher R := Some anonymous type which represents the result of a transformation on each MatchResult V := T | Option[T] | Seq[T] L := R | Option[R] | Seq[R]

  10. trait TransformResultTr[A, R] extends AnyRef

    Permalink

    System needed to recover the correct type from a 'transfrom' call.

    System needed to recover the correct type from a 'transfrom' call. 1) x.transform{case x: T => x} : T 2) x.transform{case x: T => (x, List(1))} : (T, List[Int])

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from CollectionLikeUI[T] to any2stringadd[CollectionLikeUI[T]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (CollectionLikeUI[T], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from CollectionLikeUI[T] to ArrowAssoc[CollectionLikeUI[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. object MatcherApply

    Permalink
  7. object TransformResultTr

    Permalink
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def ensuring(cond: (CollectionLikeUI[T]) ⇒ Boolean, msg: ⇒ Any): CollectionLikeUI[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from CollectionLikeUI[T] to Ensuring[CollectionLikeUI[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (CollectionLikeUI[T]) ⇒ Boolean): CollectionLikeUI[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from CollectionLikeUI[T] to Ensuring[CollectionLikeUI[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: ⇒ Any): CollectionLikeUI[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from CollectionLikeUI[T] to Ensuring[CollectionLikeUI[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): CollectionLikeUI[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from CollectionLikeUI[T] to Ensuring[CollectionLikeUI[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from CollectionLikeUI[T] to StringFormat[CollectionLikeUI[T]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def [B](y: B): (CollectionLikeUI[T], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from CollectionLikeUI[T] to ArrowAssoc[CollectionLikeUI[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from CollectionLikeUI[T] to any2stringadd[CollectionLikeUI[T]]

Inherited by implicit conversion StringFormat from CollectionLikeUI[T] to StringFormat[CollectionLikeUI[T]]

Inherited by implicit conversion Ensuring from CollectionLikeUI[T] to Ensuring[CollectionLikeUI[T]]

Inherited by implicit conversion ArrowAssoc from CollectionLikeUI[T] to ArrowAssoc[CollectionLikeUI[T]]

Ungrouped