Packages

p

scala

package scala

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. scala
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type ::[A] = scala.collection.immutable.::[A]
  2. type AbstractMethodError = java.lang.AbstractMethodError
  3. type AnyRef = AnyRef
  4. type ArrayIndexOutOfBoundsException = java.lang.ArrayIndexOutOfBoundsException
  5. type BigDecimal = scala.math.BigDecimal
  6. type BigInt = scala.math.BigInt
  7. type BufferedIterator[+A] = scala.collection.BufferedIterator[A]
  8. type ClassCastException = java.lang.ClassCastException
  9. trait Curried extends CurriedWithTypeParameters

    A marker trait that enables curried varargs.

    A marker trait that enables curried varargs.

    Given a function call f(a, b, c), when f is a subtype of Curried, it should be rewritten to f.applyBegin.applyNext(a).applyNext(b).applyNext(c).applyEnd.

    Optionally, some arguments to a Curried call may be a sequence argument marked as _*. Given a function call f(p1, s1: _*, p2), when translating it to the curried form, the sequence argument will becomes a foldLeft call.

    f.applyBegin
      .applyNext(p1)
      .applyNextSeq(s1)
      .applyNext(p2)
    .applyEnd
    

    Unlike traditional repeated parameters, which restrict the sequence argument at the last position, sequence arguments in a curried call are allowed at any position.

    When a Curried is invoked with some type arguments, those type arguments will be moved to the applyBegin method. Therefore, List[Int](1 to 3: _*) should be translated to (1 to 3).foldLeft(List.applyBegin[Int])(_.applyNext(_)).applyEnd.

    Example:
    1. Fast list builder

      class PartiallyAppliedInitializer[A](builder: collection.mutable.Builder[A, List[A]]) {
        def applyEnd = builder.result
        def applyNextSeq(seq: Seq[A]) = {
          builder ++= seq
          this
        }
        def applyNext(a: A) = {
          builder += a
          this
        }
      }
      object FastListInitializer extends Curried {
        def applyBegin[A]:PartiallyAppliedInitializer[A] = new PartiallyAppliedInitializer(List.newBuilder[A])
      }
      
      FastListInitializer(0, 4) should be(List(0, 4))
      FastListInitializer[Int](0, 100 to 103: _*, 1) should be(List(0, 100, 101, 102, 103, 1))
  10. type Either[+A, +B] = scala.util.Either[A, B]
  11. type Equiv[T] = scala.math.Equiv[T]
  12. type Error = java.lang.Error
  13. type Exception = java.lang.Exception
  14. type Fractional[T] = scala.math.Fractional[T]
  15. type IllegalArgumentException = java.lang.IllegalArgumentException
  16. type IndexOutOfBoundsException = java.lang.IndexOutOfBoundsException
  17. type IndexedSeq[+A] = scala.collection.IndexedSeq[A]
  18. type Integral[T] = scala.math.Integral[T]
  19. type InterruptedException = java.lang.InterruptedException
  20. type Iterable[+A] = scala.collection.Iterable[A]
  21. type Iterator[+A] = scala.collection.Iterator[A]
  22. type Left[+A, +B] = scala.util.Left[A, B]
  23. type List[+A] = scala.collection.immutable.List[A]
  24. type NoSuchElementException = java.util.NoSuchElementException
  25. type NullPointerException = java.lang.NullPointerException
  26. type NumberFormatException = java.lang.NumberFormatException
  27. type Numeric[T] = scala.math.Numeric[T]
  28. type Ordered[T] = scala.math.Ordered[T]
  29. type Ordering[T] = scala.math.Ordering[T]
  30. type PartialOrdering[T] = scala.math.PartialOrdering[T]
  31. type PartiallyOrdered[T] = scala.math.PartiallyOrdered[T]
  32. type Range = scala.collection.immutable.Range
  33. type Right[+A, +B] = scala.util.Right[A, B]
  34. type RuntimeException = java.lang.RuntimeException
  35. type Seq[+A] = scala.collection.Seq[A]
  36. type Stream[+A] = scala.collection.immutable.Stream[A]
  37. type StringBuilder = scala.collection.mutable.StringBuilder
  38. type StringIndexOutOfBoundsException = java.lang.StringIndexOutOfBoundsException
  39. type Throwable = java.lang.Throwable
  40. type Traversable[+A] = scala.collection.Traversable[A]
  41. type TraversableOnce[+A] = scala.collection.TraversableOnce[A]
  42. type UnsupportedOperationException = java.lang.UnsupportedOperationException
  43. type Vector[+A] = scala.collection.immutable.Vector[A]

Value Members

  1. val #::: scala.collection.immutable.Stream.#::.type
  2. val +:: scala.collection.+:.type
  3. val :+: scala.collection.:+.type
  4. val ::: scala.collection.immutable.::.type
  5. val AnyRef: Specializable
  6. val BigDecimal: scala.math.BigDecimal.type
  7. val BigInt: scala.math.BigInt.type
  8. val Either: scala.util.Either.type
  9. val Equiv: scala.math.Equiv.type
  10. val Fractional: scala.math.Fractional.type
  11. val IndexedSeq: scala.collection.IndexedSeq.type
  12. val Integral: scala.math.Integral.type
  13. val Iterable: scala.collection.Iterable.type
  14. val Iterator: scala.collection.Iterator.type
  15. val Left: scala.util.Left.type
  16. val List: scala.collection.immutable.List.type
  17. val Nil: scala.collection.immutable.Nil.type
  18. val Numeric: scala.math.Numeric.type
  19. val Ordered: scala.math.Ordered.type
  20. val Ordering: scala.math.Ordering.type
  21. val Range: scala.collection.immutable.Range.type
  22. val Right: scala.util.Right.type
  23. val Seq: scala.collection.Seq.type
  24. val Stream: scala.collection.immutable.Stream.type
  25. val StringBuilder: scala.collection.mutable.StringBuilder.type
  26. val Traversable: scala.collection.Traversable.type
  27. val Vector: scala.collection.immutable.Vector.type

Inherited from AnyRef

Inherited from Any

Ungrouped