com.eharmony.aloha.io.multiple

MultipleReadable

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
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def mapper: (A) ⇒ B

    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: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

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

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

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

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

    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

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

    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

    returns

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

    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.

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

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

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

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

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

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

    Definition Classes
    AnyRef
  21. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped