com.paypal.cascade

common

package common

Visibility
  1. Public
  2. All

Value Members

  1. package app

  2. package concurrent

  3. package constants

  4. package either

    Convenience methods and implicits for working with scala.util.Either.

    Convenience methods and implicits for working with scala.util.Either.

    When working with Either, our convention is to right-bias correct values. That is, when working with an Either, prefer to use Either[Failure, Success] as the pattern.

    Additionally, strongly prefer to use scala.util.Try over Either whenever a failure case is to be a Throwable. In general practice, this should encompass the vast majority of cases.

  5. package enumeration

    Contains a fully type-safe enumeration framework.

    Contains a fully type-safe enumeration framework. Takes more setup & code than the built-in scala.Enumeration, but has two distinct advantages:

    1. Configurable outcomes when a conversion from a String to Enumeration value fails 2. Non-exhaustive match warnings when one or more Enumeration values are not included in a match

    By comparison, scala.Enumeration will allow a match over as few as one Enumeration type, which runs the risk of a scala.MatchError. This will alert at compile time as to the possibility of a match miss.

    As of Jackson 2.x, a method exists to directly serialize scala.Enumeration, which involves writing less up-front boilerplate. One distinct downside, however, is the need for a special Jackson annotation on case classes that use Enumerations in this way. The annotation must be applied directly to each case class member that is an Enumeration. In this way, serializing scala.Enumeration in Jackson involves substantially more boilerplate effort than the custom Enumeration presented here. See https://github.com/FasterXML/jackson-module-scala/wiki/Enumeration for more information.

    For these reasons, our custom Enumeration type should be preferred instead of scala.Enumeration or java.util.Enumeration. See the examples subproject for a sample implementation.

  6. package future

    Convenience methods and implicits for working with Futures.

  7. package logging

    Convenience methods and implicits for working with logging.

  8. package option

    Convenience methods and implicit wrappers for working with scala.Option

  9. package properties

  10. package random

  11. package seq

    Convenience methods and implicit wrappers for working with scala.collection.Seq

  12. package service

  13. package string

    Convenience methods and implicit wrappers for working with Strings

  14. package trys

    Convenience wrappers and methods for working with scala.util.Try.

    Convenience wrappers and methods for working with scala.util.Try. Named trys so that it doesn't conflict with the try keyword (backticks on packages are unattractive).

  15. package util

Ungrouped