com.twitter.algebird

FirstAggregator

case class FirstAggregator[T]() extends Aggregator[T, T, T] with Product with Serializable

Aggregator that selects the first instance of T in the aggregated stream.

Linear Supertypes
Serializable, Product, Equals, Aggregator[T, T, T], Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FirstAggregator
  2. Serializable
  3. Product
  4. Equals
  5. Aggregator
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FirstAggregator()

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. def andThenPresent[D](present2: (T) ⇒ D): Aggregator[T, T, D]

    Like calling andThen on the present function

    Like calling andThen on the present function

    Definition Classes
    Aggregator
  7. def append(l: T, r: T): T

    Definition Classes
    Aggregator
  8. def appendAll(old: T, items: TraversableOnce[T]): T

    Definition Classes
    Aggregator
  9. def apply(inputs: TraversableOnce[T]): T

    This may error if inputs are empty (for Monoid Aggregators it never will, instead you see present(Monoid.

    This may error if inputs are empty (for Monoid Aggregators it never will, instead you see present(Monoid.zero[B])

    Definition Classes
    Aggregator
  10. def applyCumulatively[In <: TraversableOnce[T], Out](inputs: In)(implicit bf: CanBuildFrom[In, T, Out]): Out

    This returns the cumulative sum of its inputs, in the same order.

    This returns the cumulative sum of its inputs, in the same order. If the inputs are empty, the result will be empty too.

    Definition Classes
    Aggregator
  11. def applyOption(inputs: TraversableOnce[T]): Option[T]

    This returns None if the inputs are empty

    This returns None if the inputs are empty

    Definition Classes
    Aggregator
  12. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def composePrepare[A1](prepare2: (A1) ⇒ T): Aggregator[A1, T, T]

    Like calling compose on the prepare function

    Like calling compose on the prepare function

    Definition Classes
    Aggregator
  15. def cumulativeIterator(inputs: Iterator[T]): Iterator[T]

    This returns the cumulative sum of its inputs, in the same order.

    This returns the cumulative sum of its inputs, in the same order. If the inputs are empty, the result will be empty too.

    Definition Classes
    Aggregator
  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]

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

    Definition Classes
    Any
  20. def join[A2 <: T, B2, C2](that: Aggregator[A2, B2, C2]): Aggregator[A2, (T, B2), (T, C2)]

    This allows you to run two aggregators on the same data with a single pass

    This allows you to run two aggregators on the same data with a single pass

    Definition Classes
    Aggregator
  21. def lift: MonoidAggregator[T, Option[T], Option[T]]

    Definition Classes
    Aggregator
  22. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  25. def prepare(v: T): T

    Definition Classes
    FirstAggregatorAggregator
  26. def present(v: T): T

    Definition Classes
    FirstAggregatorAggregator
  27. def reduce(items: TraversableOnce[T]): T

    This may error if items is empty.

    This may error if items is empty. To be safe you might use reduceOption if you don't know that items is non-empty

    Definition Classes
    Aggregator
  28. def reduce(l: T, r: T): T

    combine two inner values

    combine two inner values

    Definition Classes
    Aggregator
  29. def reduceOption(items: TraversableOnce[T]): Option[T]

    This is the safe version of the above.

    This is the safe version of the above. If the input in empty, return None, else reduce the items

    Definition Classes
    Aggregator
  30. val semigroup: Semigroup[T]

    Definition Classes
    FirstAggregatorAggregator
  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  32. def toFold: Fold[T, Option[T]]

    An Aggregator can be converted to a Fold, but not vice-versa Note, a Fold is more constrained so only do this if you require joining a Fold with an Aggregator to produce a Fold

    An Aggregator can be converted to a Fold, but not vice-versa Note, a Fold is more constrained so only do this if you require joining a Fold with an Aggregator to produce a Fold

    Definition Classes
    Aggregator
  33. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. def zip[A2, B2, C2](ag2: Aggregator[A2, B2, C2]): Aggregator[(T, A2), (T, B2), (T, C2)]

    This allows you to join two aggregators into one that takes a tuple input, which in turn allows you to chain .

    This allows you to join two aggregators into one that takes a tuple input, which in turn allows you to chain .composePrepare onto the result if you have an initial input that has to be prepared differently for each of the joined aggregators.

    The law here is: ag1.zip(ag2).apply(as.zip(bs)) == (ag1(as), ag2(bs))

    Definition Classes
    Aggregator

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Aggregator[T, T, T]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped