object Val
A utility object for creating Formats for Vals.
- Alphabetic
- By Inheritance
- Val
- 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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
format[A, V <: Val[A]](f: (A) ⇒ V)(implicit fmt: Format[A]): Format[V]
Returns a `Format` for a `Val`, which treats the
Val
as its contained value.Returns a `Format` for a `Val`, which treats the
Val
as its contained value.- A
the type of the contained value
- V
the type of the
Val
- f
a function for constructing a
Val
from a value- fmt
a
Format
for the value contained in theVal
- returns
a
Format
for the specifiedVal
-
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
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
reads[A, V <: Val[A]](f: (A) ⇒ V)(implicit arg0: Reads[A]): Reads[V]
Returns a `Reads` for a `Val`, which treats the
Val
as its contained value.Returns a `Reads` for a `Val`, which treats the
Val
as its contained value.- A
the type of the contained value
- V
the type of the
Val
- f
a function for constructing a
Val
from a value- returns
a
Reads
for the specifiedVal
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- 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( ... )
-
def
writes[A, V <: Val[A]](implicit arg0: Writes[A]): Writes[V]
Returns a `Writes` for a `Val`, which treats the
Val
as its contained value.Returns a `Writes` for a `Val`, which treats the
Val
as its contained value.- A
the type of the contained value
- V
the type of the
Val
- returns
a
Writes
for the specifiedVal
-
def
writes[A, V <: Val[A]](f: (A) ⇒ V)(implicit arg0: Writes[A]): Writes[V]
Returns a `Writes` for a `Val`, which treats the
Val
as its contained value.Returns a `Writes` for a `Val`, which treats the
Val
as its contained value.- A
the type of the contained value
- V
the type of the
Val
- f
a function for constructing a
Val
from a value- returns
a
Writes
for the specifiedVal
- Annotations
- @inline()
- Note
The function
f
is not used to construct theWrites
; merely to drive type inference. This method is to mirror reads and format, and to make invocations look cleaner. When a case class is used for theVal
, such as the one that follows:case class Foo(value: Bar) extends AnyVal with Val[Bar]
the class's companion object can be used for the function
f
, yielding the invocationVal.writes(Foo)
. This conveys the meaning of the method invocation well, and is less awkward thanVal.writes[Bar, Foo]
.