Object

sclib.ops

all

Related Doc: package ops

Permalink

object all extends either with int with java8 with list with option with ordering with string with try

use import sclib.ops.all._ to import all

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. all
  2. try
  3. string
  4. ordering
  5. option
  6. list
  7. java8
  8. int
  9. either
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit class Any2Left[A] extends AnyRef

    Permalink

    shorthand constructor for Left

    shorthand constructor for Left

    Definition Classes
    either
    Example:
    1. scala> import sclib.ops.either._
      scala> "BOOM".left
      res0: Either[String,Nothing] = Left(BOOM)
  2. implicit class Any2Right[B] extends AnyRef

    Permalink

    shorthand constructor for Right

    shorthand constructor for Right

    Definition Classes
    either
    Example:
    1. scala> import sclib.ops.either._
      scala> 1.right
      res0: Either[Nothing,Int] = Right(1)
  3. implicit class Any2Some[A] extends AnyRef

    Permalink

    shorthand constructor for Some

    shorthand constructor for Some

    Definition Classes
    option
  4. implicit class Any2Success[A] extends AnyRef

    Permalink

    shorthand constructor for scala.util.Success

    shorthand constructor for scala.util.Success

    Definition Classes
    try
    Example:
    1. scala> import sclib.ops.`try`._
      scala> 3.success
      res0: scala.util.Try[Int] = Success(3)
  5. implicit class EitherOps[A, B] extends AnyRef

    Permalink

    extensions on Either instances

    extensions on Either instances

    Definition Classes
    either
  6. implicit class IntOps extends AnyRef

    Permalink
    Definition Classes
    int
  7. implicit class JStreamOps[A] extends AnyRef

    Permalink

    extend Stream

    extend Stream

    Definition Classes
    java8
  8. implicit class ListOps[A] extends AnyRef

    Permalink

    extensions on List instances

    extensions on List instances

    Definition Classes
    list
  9. implicit class OrderingSyntax[A] extends AnyRef

    Permalink

    you have to add an implicit parameter for the 'Ordering' and import the parameter in the function to use it's members (<, <=, >, >=)

    without this import

    you have to add an implicit parameter for the 'Ordering' and import the parameter in the function to use it's members (<, <=, >, >=)

    scala> def isSorted[A](xs: List[A])(implicit ordering: Ordering[A]): Boolean = {
         |   import ordering._
         |   xs match {
         |     case a :: b :: ys => a <= b && isSorted(b :: ys)
         |     case _            => true
         |   }
         | }
    isSorted: [A](xs: List[A])(implicit ordering: Ordering[A])Boolean
    with this import

    only add the context bound for 'Ordering'

    scala> import sclib.ops.ordering._
    scala> def isSorted2[A: Ordering](xs: List[A]): Boolean = xs match {
         |   case a :: b :: ys => a <= b && isSorted2(b :: ys)
         |   case _            => true
         | }
    isSorted2: [A](xs: List[A])(implicit evidence$1: Ordering[A])Boolean
    Definition Classes
    ordering
  10. trait ParsedFromString[F[_], A] extends AnyRef

    Permalink

    Type-Class for the result of StringOps.parseXX

    Type-Class for the result of StringOps.parseXX

    Definition Classes
    string
  11. implicit class String2Failure extends AnyRef

    Permalink

    shorthand constructor for Failure from a String

    shorthand constructor for Failure from a String

    Definition Classes
    try
    Example:
    1. scala> import sclib.ops.`try`._
      scala> "BOOM".failure
      res0: scala.util.Try[Nothing] = Failure(java.lang.Exception: BOOM)
  12. implicit class StringOps extends AnyRef

    Permalink
    Definition Classes
    string
  13. implicit class Throwable2Failure extends AnyRef

    Permalink

    shorthand constructor for Failure from a Throwable

    shorthand constructor for Failure from a Throwable

    Definition Classes
    try
    Example:
    1. scala> import sclib.ops.`try`._
      scala> new IllegalArgumentException("BOOM").failure[Int]
      res0: scala.util.Try[Int] = Failure(java.lang.IllegalArgumentException: BOOM)
  14. implicit class TraversableOfEither[A, B, CC[X] <: Traversable[X]] extends AnyRef

    Permalink

    reducing many Eithers into a single Either

    reducing many Eithers into a single Either

    Definition Classes
    either
  15. implicit class TraversableOfOption[A, CC[X] <: Traversable[X]] extends AnyRef

    Permalink

    reducing many Options into a single Option

    reducing many Options into a single Option

    Definition Classes
    option
  16. implicit class TraversableOfTry[A, CC[X] <: Traversable[X]] extends AnyRef

    Permalink

    reducing many Trys into a single Try

    reducing many Trys into a single Try

    Definition Classes
    try
  17. implicit class TryOps[A] extends AnyRef

    Permalink

    extensions on Try instances

    extensions on Try instances

    Definition Classes
    try

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. object ListOps

    Permalink

    utility's for List

    utility's for List

    Definition Classes
    list
  5. object ParsedFromString

    Permalink
    Definition Classes
    string
  6. implicit def SFunction2BinaryOperation[A](f: (A, A) ⇒ A): BinaryOperator[A]

    Permalink

    convert a scala.Function2 to a java.util.function.BinaryOperator

    convert a scala.Function2 to a java.util.function.BinaryOperator

    Definition Classes
    java8
    Example:
    1. without the import:

      scala> java.util.stream.Stream.of(1, 2, 3, 4).reduce(0, (_: Int) + (_: Int))
      <console>:12: error: overloaded method value reduce with alternatives:
        [U](x$1: U, x$2: java.util.function.BiFunction[U, _ >: Int, U], x$3: java.util.function.BinaryOperator[U])U <and>
        (x$1: java.util.function.BinaryOperator[Int])java.util.Optional[Int] <and>
        (x$1: Int,x$2: java.util.function.BinaryOperator[Int])Int
       cannot be applied to (Int, (Int, Int) => Int)
             java.util.stream.Stream.of(1, 2, 3, 4).reduce(0, (_: Int) + (_: Int))

      with the import:

      scala> import sclib.ops.java8._
      scala> java.util.stream.Stream.of(1, 2, 3, 4).reduce(0, (_: Int) + (_: Int))
      res1: Int = 10
  7. implicit def SFunction2Consumer[A](f: (A) ⇒ Unit): Consumer[A]

    Permalink

    convert a scala.Function1 to a java.util.function.Consumer

    convert a scala.Function1 to a java.util.function.Consumer

    Definition Classes
    java8
    Example:
    1. without the import:

      scala> java.util.stream.Stream.of(1, 2, 3, 4).forEach(println(_: Int))
      <console>:12: error: type mismatch;
       found   : Int => Unit
       required: java.util.function.Consumer[_ >: Int]
             java.util.stream.Stream.of(1, 2, 3, 4).forEach(println(_: Int))

      with the import:

      scala> import sclib.ops.java8._
      scala> java.util.stream.Stream.of(1, 2, 3, 4).forEach(println(_: Int))
      1
      2
      3
      4
  8. implicit def SFunction2JFunction[A, B](f: (A) ⇒ B): Function[A, B]

    Permalink

    convert a scala.Function1 to a java.util.function.Function

    convert a scala.Function1 to a java.util.function.Function

    Definition Classes
    java8
    Example:
    1. without the import:

      scala> java.util.stream.Stream.of(1, 2, 3,4).map((_: Int) * 10).toArray
      <console>:12: error: type mismatch;
      found   : Int => Int
      required: java.util.function.Function[_ >: Int, _]
             java.util.stream.Stream.of(1, 2, 3,4).map((_: Int) * 10).toArray

      with the import:

      scala> import sclib.ops.java8._
      scala> java.util.stream.Stream.of(1, 2, 3,4).map((_: Int) * 10).toArray
      res1: Array[Object] = Array(10, 20, 30, 40)
  9. implicit def SFunction2Predicate[A](f: (A) ⇒ Boolean): Predicate[A]

    Permalink

    convert a scala.Function1 to a java.util.function.Predicate

    convert a scala.Function1 to a java.util.function.Predicate

    Definition Classes
    java8
    Example:
    1. without the import:

      scala> java.util.stream.Stream.of(1, 2, 3, 4).filter((_: Int) < 3).toArray
      <console>:12: error: type mismatch;
       found   : Int => Boolean
       required: java.util.function.Predicate[_ >: Int]
             java.util.stream.Stream.of(1, 2, 3, 4).filter((_: Int) < 3).toArray

      with the import:

      scala> import sclib.ops.java8._
      scala> java.util.stream.Stream.of(1, 2, 3, 4).filter((_: Int) < 3).toArray
      res1: Array[Object] = Array(1, 2)
  10. final def asInstanceOf[T0]: T0

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

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

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

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

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

    Permalink
    Definition Classes
    AnyRef
  19. def none[A]: Option[A]

    Permalink

    shorthand constructor for None

    shorthand constructor for None

    Definition Classes
    option
  20. final def notify(): Unit

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

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

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

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

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

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

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

Inherited from try

Inherited from string

Inherited from ordering

Inherited from option

Inherited from list

Inherited from java8

Inherited from int

Inherited from either

Inherited from AnyRef

Inherited from Any

Ungrouped