Class/Object

io.chrisdavenport.selection

Selection

Related Docs: object Selection | package selection

Permalink

final case class Selection[F[_], B, A](unwrap: F[Either[B, A]]) extends AnyVal with Product with Serializable

A selection wraps a Functor f and has an unselected type b and a selected type a

Source
Selection.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Selection
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyVal
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Selection(unwrap: F[Either[B, A]])

    Permalink

Value Members

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

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

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

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

    Permalink
    Definition Classes
    Any
  5. def deselectAll(implicit F: Functor[F], ev: =:=[B, A]): Selection[F, A, A]

    Permalink

    Deselect all items in the container

  6. def exclude(f: (A) ⇒ Boolean)(implicit F: Functor[F], ev: =:=[B, A]): Selection[F, A, A]

    Permalink

    Remove items which match a predicate to the current selection

  7. def forgetSelection(implicit F: Functor[F], ev: =:=[B, A]): F[A]

    Permalink

    Drops selection from your functor returning all values (selected or not).

  8. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  9. def getSelected(implicit F: Foldable[F]): List[A]

    Permalink

    Collect all selected values into a list.

    Collect all selected values into a list. For more complex operations use foldMap.

  10. def getUnselected(implicit F: Foldable[F]): List[B]

    Permalink

    Collect all unselected values into a list.

    Collect all unselected values into a list. For more complex operations use foldMap.

  11. def include(f: (A) ⇒ Boolean)(implicit F: Functor[F], ev: =:=[B, A]): Selection[F, A, A]

    Permalink

    Add items which match a predicate to the current selection

  12. def invertSelection(implicit F: Functor[F]): Selection[F, A, B]

    Permalink

    Flip the selection, all selected are now unselected and vice versa

  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def mapK[G[_]](f: ~>[F, G]): Selection[G, B, A]

    Permalink

    Perform a natural transformation over the underlying container of a selectable

  15. def mapSelected[C](f: (A) ⇒ C)(implicit F: Functor[F]): Selection[F, B, C]

    Permalink

    Map over selected values.

  16. def mapUnselected[C](f: (B) ⇒ C)(implicit F: Functor[F]): Selection[F, C, A]

    Permalink

    Map over unselected values.

  17. def modifySelection[G[_], C, D](f: (F[Either[B, A]]) ⇒ G[Either[C, D]]): Selection[G, C, D]

    Permalink

    Modify the underlying representation of a selection

  18. def select(f: (A) ⇒ Boolean)(implicit F: Functor[F], ev: =:=[B, A]): Selection[F, A, A]

    Permalink

    Clear the selection then select only items which match a predicate.

  19. def selectAll(implicit F: Functor[F], ev: =:=[B, A]): Selection[F, A, A]

    Permalink

    Select all items in the container

  20. def selectWithContext(f: (F[A]) ⇒ Boolean)(implicit F: Comonad[F], ev: =:=[B, A]): Selection[F, A, A]

    Permalink

    Select values based on their context within a comonad.

  21. def unify[C](f1: (B) ⇒ C)(f2: (A) ⇒ C)(implicit F: Functor[F]): F[C]

    Permalink

    Unify selected and unselected and forget the selection

  22. val unwrap: F[Either[B, A]]

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyVal

Inherited from Any

Ungrouped