Size

object Size

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

  • scala.collection.GenTraversable

  • String

  • Array

  • java.util.Collection

  • java.util.Map

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

  • arbitary object with a parameterless size method that returns Int

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

  • arbitary object with a parameterless getSize method that returns Int

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

  • arbitary object with a parameterless size method that returns Long

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

  • arbitary object with a parameterless getSize method that returns Long

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

Implicits

Implicits

implicit def sizeOfAnyRefWithGetSizeMethodForInt[T <: AnyRef { def getSize(): Int; }]: Size[T]

Enable Size implementation for arbitary object with getSize() method that returns Int.

Enable Size implementation for arbitary object with getSize() method that returns Int.

Type parameters:
T

any type with getSize() method that returns Int

Returns:

Size[T] that supports T in have size syntax

implicit def sizeOfAnyRefWithGetSizeMethodForLong[T <: AnyRef { def getSize(): Long; }]: Size[T]

Enable Size implementation for arbitary object with getSize() method that returns Long.

Enable Size implementation for arbitary object with getSize() method that returns Long.

Type parameters:
T

any type with getSize() method that returns Long

Returns:

Size[T] that supports T in have size syntax

implicit def sizeOfAnyRefWithParameterlessGetSizeMethodForInt[T <: AnyRef { def getSize: Int; }]: Size[T]

Enable Size implementation for arbitary object with parameterless getSize method that returns Int.

Enable Size implementation for arbitary object with parameterless getSize method that returns Int.

Type parameters:
T

any type with parameterless getSize method that returns Int

Returns:

Size[T] that supports T in have size syntax

implicit def sizeOfAnyRefWithParameterlessGetSizeMethodForLong[T <: AnyRef { def getSize: Long; }]: Size[T]

Enable Size implementation for arbitary object with getSize method that returns Long.

Enable Size implementation for arbitary object with getSize method that returns Long.

Type parameters:
T

any type with getSize method that returns Long

Returns:

Size[T] that supports T in have size syntax

implicit def sizeOfAnyRefWithParameterlessSizeMethodForInt[T <: AnyRef { def size: Int; }]: Size[T]

Enable Size implementation for arbitary object with parameterless size method that returns Int.

Enable Size implementation for arbitary object with parameterless size method that returns Int.

Type parameters:
T

any type with parameterless size method that returns Int

Returns:

Size[T] that supports T in have size syntax

implicit def sizeOfAnyRefWithParameterlessSizeMethodForLong[T <: AnyRef { def size: Long; }]: Size[T]

Enable Size implementation for arbitary object with parameterless size method that returns Long.

Enable Size implementation for arbitary object with parameterless size method that returns Long.

Type parameters:
T

any type with parameterless size method that returns Long

Returns:

Size[T] that supports T in have size syntax

implicit def sizeOfAnyRefWithSizeMethodForInt[T <: AnyRef { def size(): Int; }]: Size[T]

Enable Size implementation for arbitary object with size() method that returns Int.

Enable Size implementation for arbitary object with size() method that returns Int.

Type parameters:
T

any type with size() method that returns Int

Returns:

Size[T] that supports T in have size syntax

implicit def sizeOfAnyRefWithSizeMethodForLong[T <: AnyRef { def size(): Long; }]: Size[T]

Enable Size implementation for arbitary object with size() method that returns Long.

Enable Size implementation for arbitary object with size() method that returns Long.

Type parameters:
T

any type with size() method that returns Long

Returns:

Size[T] that supports T in have size syntax

implicit def sizeOfArray[E]: Size[Array[E]]

Enable Size implementation for Array

Enable Size implementation for Array

Type parameters:
E

the type of the element in the Array

Returns:

Size[Array[E]] that supports Array in have size syntax

implicit def sizeOfGenTraversable[TRAV <: Iterable[_]]: Size[TRAV]

Enable Size implementation for scala.collection.GenTraversable

Enable Size implementation for scala.collection.GenTraversable

Type parameters:
TRAV

any subtype of scala.collection.GenTraversable

Returns:

Size[TRAV] that supports scala.collection.GenTraversable in have size syntax

implicit def sizeOfJavaCollection[JCOL <: Collection[_]]: Size[JCOL]

Enable Size implementation for java.util.Collection

Enable Size implementation for java.util.Collection

Type parameters:
JCOL

any subtype of java.util.Collection

Returns:

Size[JCOL] that supports java.util.Collection in have size syntax

implicit def sizeOfJavaMap[JMAP <: Map[_, _]]: Size[JMAP]

Enable Size implementation for java.util.Map

Enable Size implementation for java.util.Map

Type parameters:
JMAP

any subtype of java.util.Map

Returns:

Size[JMAP] that supports java.util.Map in have size syntax

implicit val sizeOfString: Size[String]

Enable Size implementation for String

Enable Size implementation for String

Returns:

Size[String] that supports String in have size syntax