abstract class PIso[S, T, A, B] extends Serializable
Iso is a type alias for PIso where S
= A
and T
= B
:
type Iso[S, A] = PIso[S, S, A, A]
An Iso defines an isomorphism between a type S and A:
get --------------------> S A <-------------------- reverseGet
A PIso allows to lift a function f: A => B
to S => T
and a function g: T => S
to B => A
g S T S <-------- T | ↑ | ↑ | | | | get | | reverseGet reverse.reverseGet | | reverse.get | | | | ↓ f | ↓ | A --------> B A B
A PIso is also a valid Getter, Fold, PLens, PPrism, POptional, PTraversal and PSetter
- S
the source of a PIso
- T
the modified source of a PIso
- A
the target of a PIso
- B
the modified target of a PIso
- Self Type
- PIso[S, T, A, B]
- See also
- Alphabetic
- By Inheritance
- PIso
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new PIso()
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
^<->[C, D](other: PIso[A, B, C, D]): PIso[S, T, C, D]
alias to composeIso
alias to composeIso
- Annotations
- @inline()
-
final
def
^<-?[C, D](other: PPrism[A, B, C, D]): PPrism[S, T, C, D]
alias to composePrism
alias to composePrism
- Annotations
- @inline()
-
final
def
^|->[C, D](other: PLens[A, B, C, D]): PLens[S, T, C, D]
alias to composeLens
alias to composeLens
- Annotations
- @inline()
-
final
def
^|->>[C, D](other: PTraversal[A, B, C, D]): PTraversal[S, T, C, D]
alias to composeTraversal
alias to composeTraversal
- Annotations
- @inline()
-
final
def
^|-?[C, D](other: POptional[A, B, C, D]): POptional[S, T, C, D]
alias to composeOptional
alias to composeOptional
- Annotations
- @inline()
- def apply[C, D, E, F, G, H](c: C, d: D, e: E, f: F, g: G, h: H)(implicit ev: <~<[(C, D, E, F, G, H), B]): T
- def apply[C, D, E, F, G](c: C, d: D, e: E, f: F, g: G)(implicit ev: <~<[(C, D, E, F, G), B]): T
- def apply[C, D, E, F](c: C, d: D, e: E, f: F)(implicit ev: <~<[(C, D, E, F), B]): T
- def apply[C, D, E](c: C, d: D, e: E)(implicit ev: <~<[(C, D, E), B]): T
- def apply[C, D](c: C, d: D)(implicit ev: <~<[(C, D), B]): T
- def apply(b: B): T
-
def
apply()(implicit ev: ===[B, Unit]): T
**********************************************************************
- final def asFold: Fold[S, A]
- final def asGetter: Getter[S, A]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def asLens: PLens[S, T, A, B]
- final def asOptional: POptional[S, T, A, B]
- final def asPrism: PPrism[S, T, A, B]
- final def asSetter: PSetter[S, T, A, B]
-
final
def
asTraversal: PTraversal[S, T, A, B]
view a PIso as a PTraversal
view a PIso as a PTraversal
- Annotations
- @inline()
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- final def composeFold[C](other: Fold[A, C]): Fold[S, C]
- final def composeGetter[C](other: Getter[A, C]): Getter[S, C]
- final def composeIso[C, D](other: PIso[A, B, C, D]): PIso[S, T, C, D]
- final def composeLens[C, D](other: PLens[A, B, C, D]): PLens[S, T, C, D]
- final def composeOptional[C, D](other: POptional[A, B, C, D]): POptional[S, T, C, D]
- final def composePrism[C, D](other: PPrism[A, B, C, D]): PPrism[S, T, C, D]
- final def composeSetter[C, D](other: PSetter[A, B, C, D]): PSetter[S, T, C, D]
-
final
def
composeTraversal[C, D](other: PTraversal[A, B, C, D]): PTraversal[S, T, C, D]
compose a PIso with a PTraversal
compose a PIso with a PTraversal
- Annotations
- @inline()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
exist(p: (A) ⇒ Boolean): (S) ⇒ Boolean
check if the target satisfies the predicate
check if the target satisfies the predicate
- Annotations
- @inline()
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
find(p: (A) ⇒ Boolean): (S) ⇒ Option[A]
find if the target satisfies the predicate
find if the target satisfies the predicate
- Annotations
- @inline()
-
final
def
first[C]: PIso[(S, C), (T, C), (A, C), (B, C)]
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
left[C]: PIso[\/[S, C], \/[T, C], \/[A, C], \/[B, C]]
- Annotations
- @inline()
-
def
mapping[F[_]](implicit arg0: Functor[F]): PIso[F[S], F[T], F[A], F[B]]
lift a PIso to a Functor level
-
final
def
modify(f: (A) ⇒ B): (S) ⇒ T
modify polymorphically the target of a PIso with a function
modify polymorphically the target of a PIso with a function
- Annotations
- @inline()
-
final
def
modifyF[F[_]](f: (A) ⇒ F[B])(s: S)(implicit arg0: Functor[F]): F[T]
modify polymorphically the target of a PIso with a Functor function
modify polymorphically the target of a PIso with a Functor function
- Annotations
- @inline()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
right[C]: PIso[\/[C, S], \/[C, T], \/[C, A], \/[C, B]]
- Annotations
- @inline()
-
final
def
second[C]: PIso[(C, S), (C, T), (C, A), (C, B)]
- Annotations
- @inline()
-
final
def
set(b: B): (S) ⇒ T
set polymorphically the target of a PIso with a value
set polymorphically the target of a PIso with a value
- Annotations
- @inline()
-
final
def
split[S1, T1, A1, B1](other: PIso[S1, T1, A1, B1]): PIso[(S, S1), (T, T1), (A, A1), (B, B1)]
pair two disjoint PIso
pair two disjoint PIso
- Annotations
- @inline()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def unapply(obj: S): Some[A]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )