trait StdInstances extends BigDecimalOptics with BigIntOptics with ByteOptics with CharOptics with DoubleOptics with EitherOptics with FunctionOptics with IntOptics with ListOptics with LongOptics with MapOptics with OptionOptics with StringOptics with Tuple1Optics with TryOptics with ChainOptics with TheseOptics with NonEmptyChainOptics with NonEmptyListOptics with NonEmptyVectorOptics with ValidatedOptics
Ordering
- Alphabetic
- By Inheritance
Inherited
- StdInstances
- ValidatedOptics
- NonEmptyVectorOptics
- NonEmptyListOptics
- NonEmptyChainOptics
- TheseOptics
- ChainOptics
- TryOptics
- Tuple1Optics
- StringOptics
- PlatformSpecificStringOptics
- OptionOptics
- MapOptics
- LongOptics
- ListOptics
- IntOptics
- FunctionOptics
- EitherOptics
- DoubleOptics
- CharOptics
- ByteOptics
- BigIntOptics
- BigDecimalOptics
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
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 asInstanceOf[T0]: T0
- Definition Classes
- Any
- val bigDecimalToInt: Prism[BigDecimal, Int]
- Definition Classes
- BigDecimalOptics
- val bigDecimalToLong: Prism[BigDecimal, Long]
- Definition Classes
- BigDecimalOptics
- val bigIntToBoolean: Prism[BigInt, Boolean]
- Definition Classes
- BigIntOptics
- val bigIntToByte: Prism[BigInt, Byte]
- Definition Classes
- BigIntOptics
- val bigIntToChar: Prism[BigInt, Char]
- Definition Classes
- BigIntOptics
- val bigIntToInt: Prism[BigInt, Int]
- Definition Classes
- BigIntOptics
- val bigIntToLong: Prism[BigInt, Long]
- Definition Classes
- BigIntOptics
- val byteToBoolean: Prism[Byte, Boolean]
- Definition Classes
- ByteOptics
- def chainToList[A]: Iso[Chain[A], List[A]]
- Definition Classes
- ChainOptics
- final def chainToNec[A]: Prism[Chain[A], NonEmptyChain[A]]
- Definition Classes
- NonEmptyChainOptics
- def chainToVector[A]: Iso[Chain[A], Vector[A]]
- Definition Classes
- ChainOptics
- val charToBoolean: Prism[Char, Boolean]
- Definition Classes
- CharOptics
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val doubleToFloat: Prism[Double, Float]
- Definition Classes
- DoubleOptics
- val doubleToInt: Prism[Double, Int]
- Definition Classes
- DoubleOptics
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def failure[E, A]: Prism[Validated[E, A], E]
- Definition Classes
- ValidatedOptics
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def flip[A, B, C]: Iso[(A) => (B) => C, (B) => (A) => C]
- Definition Classes
- FunctionOptics
- final def flipped[A, B, C]: ((A) => (B) => C) => (B) => (A) => C
- Definition Classes
- FunctionOptics
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val intToBoolean: Prism[Int, Boolean]
- Definition Classes
- IntOptics
- val intToByte: Prism[Int, Byte]
- Definition Classes
- IntOptics
- val intToChar: Prism[Int, Char]
- Definition Classes
- IntOptics
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def listToVector[A]: Iso[List[A], Vector[A]]
- Definition Classes
- ListOptics
- val longToBoolean: Prism[Long, Boolean]
- Definition Classes
- LongOptics
- val longToByte: Prism[Long, Byte]
- Definition Classes
- LongOptics
- val longToChar: Prism[Long, Char]
- Definition Classes
- LongOptics
- val longToInt: Prism[Long, Int]
- Definition Classes
- LongOptics
- def mapToSet[K]: Iso[Map[K, Unit], Set[K]]
- Definition Classes
- MapOptics
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def necToOneAnd[A]: Iso[NonEmptyChain[A], OneAnd[Chain, A]]
- Definition Classes
- NonEmptyChainOptics
- final def nelToOneAnd[A]: Iso[NonEmptyList[A], OneAnd[List, A]]
- Definition Classes
- NonEmptyListOptics
- final def nevToOneAnd[A]: Iso[NonEmptyVector[A], OneAnd[Vector, A]]
- Definition Classes
- NonEmptyVectorOptics
- final def none[A]: Prism[Option[A], Unit]
- Definition Classes
- OptionOptics
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def optNecToChain[A]: Iso[Option[NonEmptyChain[A]], Chain[A]]
- Definition Classes
- NonEmptyChainOptics
- final def optNelToList[A]: Iso[Option[NonEmptyList[A]], List[A]]
- Definition Classes
- NonEmptyListOptics
- final def optNevToVector[A]: Iso[Option[NonEmptyVector[A]], Vector[A]]
- Definition Classes
- NonEmptyVectorOptics
- final def optionToDisjunction[A]: Iso[Option[A], Either[Unit, A]]
- Definition Classes
- OptionOptics
- def pChainToList[A, B]: PIso[Chain[A], Chain[B], List[A], List[B]]
- Definition Classes
- ChainOptics
- final def pChainToNec[A, B]: PPrism[Chain[A], Chain[B], NonEmptyChain[A], NonEmptyChain[B]]
- Definition Classes
- NonEmptyChainOptics
- def pChainToVector[A, B]: PIso[Chain[A], Chain[B], Vector[A], Vector[B]]
- Definition Classes
- ChainOptics
- final def pFailure[E, A, F]: PPrism[Validated[E, A], Validated[F, A], E, F]
- Definition Classes
- ValidatedOptics
- def pListToVector[A, B]: PIso[List[A], List[B], Vector[A], Vector[B]]
- Definition Classes
- ListOptics
- final def pNecToOneAnd[A, B]: PIso[NonEmptyChain[A], NonEmptyChain[B], OneAnd[Chain, A], OneAnd[Chain, B]]
- Definition Classes
- NonEmptyChainOptics
- final def pNelToOneAnd[A, B]: PIso[NonEmptyList[A], NonEmptyList[B], OneAnd[List, A], OneAnd[List, B]]
- Definition Classes
- NonEmptyListOptics
- final def pNevToOneAnd[A, B]: PIso[NonEmptyVector[A], NonEmptyVector[B], OneAnd[Vector, A], OneAnd[Vector, B]]
- Definition Classes
- NonEmptyVectorOptics
- final def pOptNecToChain[A, B]: PIso[Option[NonEmptyChain[A]], Option[NonEmptyChain[B]], Chain[A], Chain[B]]
- Definition Classes
- NonEmptyChainOptics
- final def pOptNelToList[A, B]: PIso[Option[NonEmptyList[A]], Option[NonEmptyList[B]], List[A], List[B]]
- Definition Classes
- NonEmptyListOptics
- final def pOptNevToVector[A, B]: PIso[Option[NonEmptyVector[A]], Option[NonEmptyVector[B]], Vector[A], Vector[B]]
- Definition Classes
- NonEmptyVectorOptics
- final def pOptionToDisjunction[A, B]: PIso[Option[A], Option[B], Either[Unit, A], Either[Unit, B]]
- Definition Classes
- OptionOptics
- final def pSome[A, B]: PPrism[Option[A], Option[B], A, B]
- Definition Classes
- OptionOptics
- final def pStdLeft[A, B, C]: PPrism[Either[A, B], Either[C, B], A, C]
- Definition Classes
- EitherOptics
- final def pStdRight[A, B, C]: PPrism[Either[A, B], Either[A, C], B, C]
- Definition Classes
- EitherOptics
- final def pSuccess[E, A, B]: PPrism[Validated[E, A], Validated[E, B], A, B]
- Definition Classes
- ValidatedOptics
- def pTheseLeft[A, B, C]: POptional[Ior[A, B], Ior[C, B], A, C]
- Definition Classes
- TheseOptics
- def pTheseRight[A, B, C]: POptional[Ior[A, B], Ior[A, C], B, C]
- Definition Classes
- TheseOptics
- final def pTrySuccess[A, B]: PPrism[Try[A], Try[B], A, B]
- Definition Classes
- TryOptics
- final def pValidatedToDisjunction[E1, E2, A1, A2]: PIso[Validated[E1, A1], Validated[E2, A2], Either[E1, A1], Either[E2, A2]]
- Definition Classes
- ValidatedOptics
- final def pVectorToNev[A, B]: PPrism[Vector[A], Vector[B], NonEmptyVector[A], NonEmptyVector[B]]
- Definition Classes
- NonEmptyVectorOptics
- final def some[A]: Prism[Option[A], A]
- Definition Classes
- OptionOptics
- final def stdLeft[A, B]: Prism[Either[A, B], A]
- Definition Classes
- EitherOptics
- final def stdRight[A, B]: Prism[Either[A, B], B]
- Definition Classes
- EitherOptics
- val stringToBoolean: Prism[String, Boolean]
- Definition Classes
- StringOptics
- val stringToByte: Prism[String, Byte]
- Definition Classes
- StringOptics
- val stringToInt: Prism[String, Int]
- Definition Classes
- StringOptics
- val stringToList: Iso[String, List[Char]]
- Definition Classes
- StringOptics
- val stringToLong: Prism[String, Long]
- Definition Classes
- StringOptics
- val stringToURI: Prism[String, URI]
- Definition Classes
- StringOptics
- val stringToURL: Prism[String, URL]
- Definition Classes
- PlatformSpecificStringOptics
- val stringToUUID: Prism[String, UUID]
- Definition Classes
- StringOptics
- final def success[E, A]: Prism[Validated[E, A], A]
- Definition Classes
- ValidatedOptics
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def theseLeft[A, B]: Optional[Ior[A, B], A]
- Definition Classes
- TheseOptics
- def theseRight[A, B]: Optional[Ior[A, B], B]
- Definition Classes
- TheseOptics
- def theseToDisjunction[A, B]: Prism[Ior[A, B], Either[A, B]]
- Definition Classes
- TheseOptics
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def tryFailure[A]: Prism[Try[A], Throwable]
- Definition Classes
- TryOptics
- final def trySuccess[A]: Prism[Try[A], A]
- Definition Classes
- TryOptics
- def tuple1Iso[A]: Iso[(A), A]
- Definition Classes
- Tuple1Optics
- final def validationToDisjunction[E, A]: Iso[Validated[E, A], Either[E, A]]
- Definition Classes
- ValidatedOptics
- final def vectorToNev[A]: Prism[Vector[A], NonEmptyVector[A]]
- Definition Classes
- NonEmptyVectorOptics
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def withDefault[A](defaultValue: A): Iso[Option[A], A]
Creates an Iso that maps
None
todefaultValue
and inversely.Creates an Iso that maps
None
todefaultValue
and inversely.val defaultTo0 = withDefault(0) defaultTo0.get(None) == 0 defaultTo0.get(Some(1)) == 1 defaultTo0.reverseGet(0) == None defaultTo0.reverseGet(1) == Some(1)
withDefault
is a valid Iso only if we consider the set ofA
withoutdefaultValue
. For example,Some(0)
breaks the round-trip property of Iso:defaultTo0.reverseGet(defaultTo0.get(Some(0))) == None
- Definition Classes
- OptionOptics
- See also
This method is called
non
in Haskell Lens.