Packages

package util

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. class DebugIterator[X] extends Iterator[X]

    TESTME

    TESTME

    X

    the underlying type of the iterator.

  2. case class FPException(msg: String, eo: Option[Throwable] = None) extends Exception with Product with Serializable

    A simple case class representing a custom exception for functional programming-related errors.

    A simple case class representing a custom exception for functional programming-related errors.

    msg

    a descriptive error message providing details about the exception.

    eo

    an optional underlying Throwable that might have caused this exception. Defaults to None if not provided. This class extends Exception, taking advantage of its constructor to include a message (msg) and optionally a cause (eo.orNull will pass null to Scala's base exception when eo is None).

  3. class FunctionIterator[X, R] extends AbstractIterator[Try[R]]

    The FunctionIterator class wraps an existing iterator to apply a function f to its elements, returning an iterator that yields Try[R], where R is the result type of the function application.

    The FunctionIterator class wraps an existing iterator to apply a function f to its elements, returning an iterator that yields Try[R], where R is the result type of the function application.

    This class processes elements from a given iterator of type X and handles various scenarios such as: - Validating inputs against a custom Joinable type class. - Handling exceptions during function execution and input processing. - Providing support for "multi-line" inputs that can be joined using the Joinable logic.

    X

    The input type of the iterator. Must have an implicit type class Joinable that provides methods for validation, joining, and a zero value.

    R

    The result type produced by applying function f to elements of type X.

    Note

    The FunctionIterator may use a mutable variable ry internally to store the result of the last element processed.

  4. trait Joinable[T] extends AnyRef

    Type class to define behavior of a type that can be joined.

    Type class to define behavior of a type that can be joined.

    T

    the joinable type.

  5. class TeeIterator[X] extends Iterator[X]

    This iterator gets its input from a Iterator[X], which is essentially a parameterless function.

    This iterator gets its input from a Iterator[X], which is essentially a parameterless function. The first n elements of the iterator can be passed to the caller of tee.

    NOTE: this is an odd name for the class. Its purpose appears to be to drop the first n elements of an iterator and make them available via tee.

    CONSIDER passing the parameter n to the tee method instead of the constructor.

    X

    the underlying type.

Value Members

  1. object FP

    Various utilities for functional programming.

  2. case object InvalidInputException extends Exception with Product with Serializable

    The InvalidInputException is a case object that extends the base Exception class.

    The InvalidInputException is a case object that extends the base Exception class. It represents an exception that is thrown when an invalid input is encountered.

  3. case object IteratorExhaustedException extends Exception with Product with Serializable

    IteratorExhaustedException is a case object that represents an exception to be thrown when an attempt is made to access an element from an iterator that has been fully traversed.

    IteratorExhaustedException is a case object that represents an exception to be thrown when an attempt is made to access an element from an iterator that has been fully traversed.

    This exception helps signal that the iterator is exhausted, meaning no more elements are available for consumption.

  4. object Joinable

    Companion object for the Joinable type class, providing default implementations of the Joinable behavior for specific types.

  5. object Reflection

    The Reflection object provides utilities for introspecting case classes using Scala reflection.

    The Reflection object provides utilities for introspecting case classes using Scala reflection. It is specifically designed to handle field extraction while ensuring compliance with Scala's case class conventions.

    This functionality is particularly useful for libraries or tools that need metadata or introspection of case class fields, like serializers or mappers.

  6. object TryUsing

Ungrouped