Length

object Length

Companion object for Length that provides implicit implementations for the following types:

  • scala.collection.GenSeq

  • String

  • Array

  • java.util.Collection

  • arbitary object with a length() method that returns Int

  • arbitary object with a parameterless length method that returns Int

  • arbitary object with a getLength() method that returns Int

  • arbitary object with a parameterless getLength method that returns Int

  • arbitary object with a length() method that returns Long

  • arbitary object with a parameterless length method that returns Long

  • arbitary object with a getLength() method that returns Long

  • arbitary object with a parameterless getLength method that returns Long

Companion:
class
class Object
trait Matchable
class Any
Length.type

Implicits

Implicits

implicit def lengthOfAnyRefWithGetLengthMethodForInt[T <: AnyRef { def getLength(): Int; }]: Length[T]

Enable Length implementation for arbitary object with getLength() method that returns Int.

Enable Length implementation for arbitary object with getLength() method that returns Int.

Type parameters:
T

any type with getLength() method that returns Int

Returns:

Length[T] that supports T in have length syntax

implicit def lengthOfAnyRefWithGetLengthMethodForLong[T <: AnyRef { def getLength(): Long; }]: Length[T]

Enable Length implementation for arbitary object with getLength() method that returns Long.

Enable Length implementation for arbitary object with getLength() method that returns Long.

Type parameters:
T

any type with getLength() method that returns Long

Returns:

Length[T] that supports T in have length syntax

implicit def lengthOfAnyRefWithLengthMethodForInt[T <: AnyRef { def length(): Int; }]: Length[T]

Enable Length implementation for arbitary object with length() method that returns Int.

Enable Length implementation for arbitary object with length() method that returns Int.

Type parameters:
T

any type with length() method that returns Int

Returns:

Length[T] that supports T in have length syntax

implicit def lengthOfAnyRefWithLengthMethodForLong[T <: AnyRef { def length(): Long; }]: Length[T]

Enable Length implementation for arbitary object with length() method that returns Long.

Enable Length implementation for arbitary object with length() method that returns Long.

Type parameters:
T

any type with length() method that returns Long

Returns:

Length[T] that supports T in have length syntax

implicit def lengthOfAnyRefWithParameterlessGetLengthMethodForInt[T <: AnyRef { def getLength: Int; }]: Length[T]

Enable Length implementation for arbitary object with parameterless getLength method that returns Int.

Enable Length implementation for arbitary object with parameterless getLength method that returns Int.

Type parameters:
T

any type with parameterless getLength method that returns Int

Returns:

Length[T] that supports T in have length syntax

implicit def lengthOfAnyRefWithParameterlessGetLengthMethodForLong[T <: AnyRef { def getLength: Long; }]: Length[T]

Enable Length implementation for arbitary object with parameterless getLength method that returns Long.

Enable Length implementation for arbitary object with parameterless getLength method that returns Long.

Type parameters:
T

any type with parameterless getLength method that returns Long

Returns:

Length[T] that supports T in have length syntax

implicit def lengthOfAnyRefWithParameterlessLengthMethodForInt[T <: AnyRef { def length: Int; }]: Length[T]

Enable Length implementation for arbitary object with parameterless length method that returns Int.

Enable Length implementation for arbitary object with parameterless length method that returns Int.

Type parameters:
T

any type with parameterless length method that returns Int

Returns:

Length[T] that supports T in have length syntax

implicit def lengthOfAnyRefWithParameterlessLengthMethodForLong[T <: AnyRef { def length: Long; }]: Length[T]

Enable Length implementation for arbitary object with parameterless length method that returns Long.

Enable Length implementation for arbitary object with parameterless length method that returns Long.

Type parameters:
T

any type with parameterless length method that returns Long

Returns:

Length[T] that supports T in have length syntax

implicit def lengthOfArray[E]: Length[Array[E]]

Enable Length implementation for Array

Enable Length implementation for Array

Type parameters:
E

the type of the element in the Array

Returns:

Length[Array[E]] that supports Array in have length syntax

implicit def lengthOfGenSeq[SEQ <: Seq[_]]: Length[SEQ]

Enable Length implementation for scala.collection.GenSeq

Enable Length implementation for scala.collection.GenSeq

Type parameters:
SEQ

any subtype of scala.collection.GenSeq

Returns:

Length[SEQ] that supports scala.collection.GenSeq in have length syntax

implicit def lengthOfJavaList[JLIST <: List[_]]: Length[JLIST]

Enable Length implementation for java.util.List

Enable Length implementation for java.util.List

Type parameters:
JLIST

any subtype of java.util.List

Returns:

Length[JLIST] that supports java.util.List in have length syntax

implicit val lengthOfString: Length[String]

Enable Length implementation for String

Enable Length implementation for String

Returns:

Length[String] that supports String in have length syntax