Object

com.eharmony.aloha.score.proto.conversions

RelaxedConversions

Related Doc: package conversions

Permalink

object RelaxedConversions extends BasicTypeScoreConversions[Option]

This object DOES NOT differentiate between a missing score and a score that could not be retrieved because the wrong type was queried. This is harder to deal with than RelaxedOps but encodes additional information. Example usage:

import com.eharmony.aloha.score.proto.conversions.RelaxedOps._
val asdf: Option[Boolean] = asBoolean(s).map(_.fold(t => throw new Exception("Tried to get a " + t + " as a Boolean"), identity))
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RelaxedConversions
  2. BasicTypeScoreConversions
  3. BasicTypeJavaScoreConversions
  4. BasicScalaTypeConversions
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asBoolean(s: Score): Option[Boolean]

    Permalink

    Get the score as a Boolean wrapped in a container where the outermost container type is Option.

    Get the score as a Boolean wrapped in a container where the outermost container type is Option. If the Score object doesn't contain a valid score, Return None; otherwise return Some. Note that subclasses will contain different representations of score.

    s

    the score

    Definition Classes
    BasicTypeScoreConversionsBasicScalaTypeConversions
    Annotations
    @inline()
  5. final def asByte(s: Score): Option[Byte]

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicScalaTypeConversions
    Annotations
    @inline()
  6. final def asDouble(s: Score): Option[Double]

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicScalaTypeConversions
    Annotations
    @inline()
  7. final def asFloat(s: Score): Option[Float]

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicScalaTypeConversions
    Annotations
    @inline()
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. final def asInt(s: Score): Option[Int]

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicScalaTypeConversions
    Annotations
    @inline()
  10. def asJavaBoolean(s: Score): Boolean

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicTypeJavaScoreConversions
    Annotations
    @inline()
  11. def asJavaByte(s: Score): Byte

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicTypeJavaScoreConversions
    Annotations
    @inline()
  12. def asJavaDouble(s: Score): Double

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicTypeJavaScoreConversions
    Annotations
    @inline()
  13. def asJavaFloat(s: Score): Float

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicTypeJavaScoreConversions
    Annotations
    @inline()
  14. def asJavaInteger(s: Score): Integer

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicTypeJavaScoreConversions
    Annotations
    @inline()
  15. def asJavaLong(s: Score): Long

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicTypeJavaScoreConversions
    Annotations
    @inline()
  16. def asJavaShort(s: Score): Short

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicTypeJavaScoreConversions
    Annotations
    @inline()
  17. def asJavaString(s: Score): String

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicTypeJavaScoreConversions
    Annotations
    @inline()
  18. final def asLong(s: Score): Option[Long]

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicScalaTypeConversions
    Annotations
    @inline()
  19. final def asShort(s: Score): Option[Short]

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicScalaTypeConversions
    Annotations
    @inline()
  20. final def asString(s: Score): Option[String]

    Permalink
    Definition Classes
    BasicTypeScoreConversionsBasicScalaTypeConversions
    Annotations
    @inline()
  21. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. def conversion[A](s: Score)(implicit arg0: ScoreConverter[A]): Option[A]

    Permalink

    Get the score.

    Get the score. The Option tells the score exists. The Right in the embedded Either contains the actual score and the Left contains the type that actually exists in the com.eharmony.aloha.score.Scores.Score if querying the wrong type.

    A

    the type to which the score should be converted.

    s

    the score

    Attributes
    protected[this]
    Definition Classes
    RelaxedConversionsBasicTypeScoreConversions
  23. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  25. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  27. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  29. def javaMapper[A](s: Score, container: Option[A])(implicit arg0: RefInfo[A]): Option[A]

    Permalink

    Attributes
    protected[this]
    Definition Classes
    RelaxedConversionsBasicTypeScoreConversions
  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from BasicTypeScoreConversions[Option]

Inherited from BasicScalaTypeConversions[Option]

Inherited from AnyRef

Inherited from Any

Ungrouped