Packages

package misc

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. final case class Boxing [-A, +B](fun: (A) ⇒ B) extends AnyVal with Product with Serializable

    Author: ghik Created: 07/01/16.

  2. trait Delegation [A, B] extends AnyRef

    A typeclass which witnesses that type A can be wrapped into trait or abstract class B

  3. trait LowPrioBoxing extends AnyRef
  4. trait LowPrioUnboxing extends AnyRef
  5. final class NOpt [+A] extends AnyVal with Serializable

    Like Opt but does have a counterpart for Some(null).

  6. trait NamedEnum extends Any

    Base trait for companion objects of sealed traits that serve as named enums

  7. trait NamedEnumCompanion [T <: NamedEnum] extends SealedEnumCompanion[T]
  8. final class Opt [+A] extends AnyVal with Serializable

    Like Option but avoids boxing and treats null as no value.

    Like Option but avoids boxing and treats null as no value. Therefore, there is no equivalent for Some(null).

    Author: ghik Created: 07/01/16.

  9. final class OptRef [+A >: Null] extends AnyVal with Serializable

    Like Opt but has better Java interop thanks to the fact that wrapped value has type A instead of Any.

    Like Opt but has better Java interop thanks to the fact that wrapped value has type A instead of Any. For example, Scala method defined like this:

    def takeMaybeString(str: OptRef[String]): Unit

    will be seen by Java as:

    public void takeMaybeString(String str);

    and null will be used to represent absence of value.

    This comes at the cost of A having to be a nullable type. Also, empty value is represented internally using null which unfortunately makes OptRef suffer from SI-7396 (hashCode fails on OptRef.Empty which means that you can't add OptRef values into hash sets or use them as hash map keys).

    Author: ghik Created: 07/01/16.

  10. abstract class SamCompanion [T, F] extends AnyRef

    Author: ghik Created: 23/11/15.

  11. trait SealedEnumCompanion [T] extends AnyRef

    Base trait for companion objects of sealed traits that serve as enums, i.e.

    Base trait for companion objects of sealed traits that serve as enums, i.e. their only values are case objects. For example:

    sealed trait SomeEnum
    object SomeEnum extends SealedEnumCompanion[SomeEnum] {
      case object FirstValue extends SomeEnum
      case object SecondValue extends SomeEnum
      case object ThirdValue extends SomeEnum
    
      // it's important to give explicit type here
      val values: List[SomeEnum] = caseObjects
    }
  12. abstract class TypedKey [T] extends AnyRef

    Base class for sealed enums which can be used as key type for a TypedMap.

    Base class for sealed enums which can be used as key type for a TypedMap. It also ensures that the TypedMap using TypedKey as a key type will always have a GenCodec.

  13. trait TypedKeyCompanion [K[X] <: TypedKey[X]] extends SealedEnumCompanion[K[_]]
  14. final class TypedMap [K[_]] extends AnyVal

    Author: ghik Created: 21/04/16.

  15. final case class Unboxing [+A, -B](fun: (B) ⇒ A) extends AnyVal with Product with Serializable

Value Members

  1. object Bidirectional

    Creates reversed partial function.

  2. object Boxing extends LowPrioBoxing with Serializable
  3. object Delegation
  4. object Implicits

    Author: ghik Created: 19/09/16.

  5. object NOpt extends Serializable
  6. object Opt extends Serializable
  7. object OptRef extends Serializable
  8. object Sam

    Author: ghik Created: 24/11/15.

  9. object SamCompanion
  10. object SealedUtils

    Author: ghik Created: 11/12/15.

  11. object TypedMap
  12. object Unboxing extends LowPrioUnboxing with Serializable

Ungrouped