class OneToOne[S, T] extends (S) ⇒ T with Serializable
Represents a 1-to-1 relation by pairing a function mapFn
with its inverse function
inverseFn
. If the function represented by this class is applied to a value for which
inverseFn
is not the inverse of mapFn
, an exception is thrown.
Note that inverseFn
can be called by the Data Processing Library on values that are not
produced by mapFn
. Define inverseFn
as a partial function to correctly restrict its domain
to the set of keys, for which an inverse can be defined.
- S
The domain of the function.
- T
The co-domain of the function.
- Alphabetic
- By Inheritance
- OneToOne
- Serializable
- Serializable
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
def
andThen[A](g: (T) ⇒ A): (S) ⇒ A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
def
apply(arg: S): T
Applies the function to a value.
Applies the function to a value.
inverseFn
is evaluated every time this function is called.- arg
The value.
- returns
The result of the function.
- Definition Classes
- OneToOne → Function1
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
compose[A](g: (A) ⇒ S): (A) ⇒ T
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val inverseFn: PartialFunction[T, S]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Function1 → AnyRef → Any
-
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( ... ) @native()