Trait/Object

com.twitter.algebird

Preparer

Related Docs: object Preparer | package algebird

Permalink

sealed trait Preparer[A, T] extends Serializable

Preparer is a way to build up an Aggregator through composition using a more natural API: it allows you to start with the input type and describe a series of transformations and aggregations from there, rather than starting from the aggregation and composing "outwards" in both directions.

Uses of Preparer will always start with a call to Preparer[A], and end with a call to monoidAggregate or a related method, to produce an Aggregator instance.

Source
Preparer.scala
Linear Supertypes
Serializable, AnyRef, Any
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Preparer
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def flatMap[U](fn: (T) ⇒ TraversableOnce[U]): FlatMapPreparer[A, U]

    Permalink

    Produce a new Preparer that chains this one-to-many transformation.

    Produce a new Preparer that chains this one-to-many transformation. Because "many" could include "none", this limits future aggregations to those done using monoids.

  2. abstract def monoidAggregate[B, C](aggregator: MonoidAggregator[T, B, C]): MonoidAggregator[A, B, C]

    Permalink

    Produce a new MonoidAggregator which includes the Preparer's transformation chain in its prepare stage.

Concrete Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def collect[U](p: PartialFunction[T, U]): FlatMapPreparer[A, U]

    Permalink
  7. def count(pred: (T) ⇒ Boolean): MonoidAggregator[A, Long, Long]

    Permalink

    count and following methods all just call monoidAggregate with one of the standard Aggregators.

    count and following methods all just call monoidAggregate with one of the standard Aggregators. see the Aggregator object for more docs.

  8. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def exists(pred: (T) ⇒ Boolean): MonoidAggregator[A, Boolean, Boolean]

    Permalink
  11. def filter(fn: (T) ⇒ Boolean): FlatMapPreparer[A, T]

    Permalink

    Filter out values that do not meet the predicate.

    Filter out values that do not meet the predicate. Like flatMap, this limits future aggregations to MonoidAggregator.

  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def flatten[U](implicit ev: <:<[T, TraversableOnce[U]]): FlatMapPreparer[A, U]

    Permalink

    Like flatMap using identity.

  14. def forall(pred: (T) ⇒ Boolean): MonoidAggregator[A, Boolean, Boolean]

    Permalink
  15. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. def headOption: MonoidAggregator[A, Option[T], Option[T]]

    Permalink

    headOption and following methods are all just calling lift with standard Aggregators see the Aggregator object for more docs

  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def lastOption: MonoidAggregator[A, Option[T], Option[T]]

    Permalink
  20. def lift[B, C](aggregator: Aggregator[T, B, C]): MonoidAggregator[A, Option[B], Option[C]]

    Permalink

    transform a given Aggregator into a MonoidAggregator by lifting the reduce and present stages into Option space

  21. def maxOption(implicit ord: Ordering[T]): MonoidAggregator[A, Option[T], Option[T]]

    Permalink
  22. def maxOptionBy[U](fn: (T) ⇒ U)(implicit arg0: Ordering[U]): MonoidAggregator[A, Option[T], Option[T]]

    Permalink
  23. def minOption(implicit ord: Ordering[T]): MonoidAggregator[A, Option[T], Option[T]]

    Permalink
  24. def minOptionBy[U](fn: (T) ⇒ U)(implicit arg0: Ordering[U]): MonoidAggregator[A, Option[T], Option[T]]

    Permalink
  25. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  28. def reduceOption(fn: (T, T) ⇒ T): MonoidAggregator[A, Option[T], Option[T]]

    Permalink
  29. def size: MonoidAggregator[A, Long, Long]

    Permalink
  30. def sortedReverseTake(count: Int)(implicit ord: Ordering[T]): MonoidAggregator[A, PriorityQueue[T], Seq[T]]

    Permalink
  31. def sortedTake(count: Int)(implicit ord: Ordering[T]): MonoidAggregator[A, PriorityQueue[T], Seq[T]]

    Permalink
  32. def sumOption(implicit sg: Semigroup[T]): MonoidAggregator[A, Option[T], Option[T]]

    Permalink
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def toList: MonoidAggregator[A, Option[Batched[T]], List[T]]

    Permalink
  35. def toSet: MonoidAggregator[A, Set[T], Set[T]]

    Permalink
  36. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  37. def uniqueCount: MonoidAggregator[A, Set[T], Int]

    Permalink
  38. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped