Trait

com.eharmony.aloha.io.multiple

MultipleReadable

Related Doc: package multiple

Permalink

trait MultipleReadable[A <: ReadableSource, B] extends AnyRef

Allows a way to read multiple readable types at once. This is especially useful because we can use this in spring with a model factory that is prototype scoped so that we can create the model factory once, it reads all of the models in bulk and then the factory can be thrown away. This way, we don't have large unnecessary objects lying around that are only useful at initialization time.

A

the readable sources. This allows objects that mix in only a subset of Readable interfaces to have type safety when trying to parse multiple sources. This allows the programmer to use the type system instead of needing to deal with cases that shouldn't exists. For instance, imagine implementing just NonFileReadable. Then, we shouldn't have to test for cases where the readable source refers to a File. The type hierarchy of ReadableSource allows this.

B

the output type of the objects produced by consuming the Readables.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MultipleReadable
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def mapper: (A) ⇒ B

    Permalink

    A function that maps from the Readable type to the output type.

    A function that maps from the Readable type to the output type.

    returns

    a function.

Concrete 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 asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def fromMultipleSources[F[_]](readableTypes: F[A])(implicit f: Functor[F]): F[B]

    Permalink

    Parse a bunch of readable sources given a Functor (see Functors, Monads, Applicatives – can be so simple).

    Parse a bunch of readable sources given a Functor (see Functors, Monads, Applicatives – can be so simple).

    F

    the functor type

    readableTypes

    a container of instances to convert into type the output type

    f

    a function instance

    returns

    a container F of the output type B

  10. def fromMultipleSources(readableTypes: Collection[A]): Collection[B]

    Permalink

    Parse a bunch of readable sources from a java collection and return the results.

    Parse a bunch of readable sources from a java collection and return the results.

    readableTypes

    a collection of sources from which

  11. def fromMultipleSources(readableTypes: List[A]): List[B]

    Permalink

    Parse a list of readable sources and return the results.

    Parse a list of readable sources and return the results.

    readableTypes

    a list of readable sources containing the necessary information to parse the resource and produce the proper outputs.

    returns

    a list of objects produced by parsing the resources in the readable types.

  12. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped