com.twitter.algebird

Preparer

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.

Linear Supertypes
Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Preparer
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

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

    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]

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

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

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

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

    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.

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

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

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

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

    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.

  14. def finalize(): Unit

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

    Like flatMap using identity.

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

  17. final def getClass(): Class[_]

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

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

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

  20. final def isInstanceOf[T0]: Boolean

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

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

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

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

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

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

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

  27. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

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

  31. def size: MonoidAggregator[A, Long, Long]

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

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

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

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

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

  37. def toSet: MonoidAggregator[A, Set[T], Set[T]]

  38. def toString(): String

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

  40. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped