JavaContainingImplicits

class Object
trait Matchable
class Any

Implicits

Implicits

implicit def containingNatureOfJavaCollection[E, JCOL <: (Collection)](implicit equality: Equality[E]): Containing[JCOL[E]]

Implicit to support Containing nature of java.util.Collection.

Implicit to support Containing nature of java.util.Collection.

Type parameters:
E

the type of the element in the java.util.Collection

JCOL

any subtype of java.util.Collection

Value parameters:
equality

Equality type class that is used to check equality of element in the java.util.Collection

Returns:

Containing[JCOL[E]] that supports java.util.Collection in relevant contain syntax

implicit def containingNatureOfJavaMap[K, V, JMAP <: (Map)](implicit equality: Equality[Entry[K, V]]): Containing[JMAP[K, V]]

Implicit to support Containing nature of java.util.Map.

Implicit to support Containing nature of java.util.Map.

Type parameters:
JMAP

any subtype of java.util.Map

K

the type of the key in the java.util.Map

V

the type of the value in the java.util.Map

Value parameters:
equality

Equality type class that is used to check equality of entry in the java.util.Map

Returns:

Containing[JMAP[K, V]] that supports java.util.Map in relevant contain syntax

implicit def convertEqualityToJavaCollectionContaining[E, JCOL <: (Collection)](equality: Equality[E]): Containing[JCOL[E]]

Implicit conversion that converts an Equality of type E into Containing of type JCOL[E], where JCOL is a subtype of java.util.Collection. This is required to support the explicit Equality syntax, for example:

Implicit conversion that converts an Equality of type E into Containing of type JCOL[E], where JCOL is a subtype of java.util.Collection. This is required to support the explicit Equality syntax, for example:

val javaList = new java.util.ArrayList[String]()
javaList.add("hi")
(javaList should contain oneOf ("HI")) (after being lowerCased)

(after being lowerCased) will returns an Equality[String] and this implicit conversion will convert it into Containing[java.util.ArrayList[String]].

Type parameters:
E

type of elements in the java.util.Collection

JCOL

subtype of java.util.Collection

Value parameters:
equality

Equality of type E

Returns:

Containing of type JCOL[E]

implicit def convertEqualityToJavaMapContaining[K, V, JMAP <: (Map)](equality: Equality[Entry[K, V]]): Containing[JMAP[K, V]]

Implicit conversion that converts an Equality of type java.util.Map.Entry[K, V] into Containing of type JMAP[K, V], where JMAP is a subtype of java.util.Map. This is required to support the explicit Equality syntax, for example:

Implicit conversion that converts an Equality of type java.util.Map.Entry[K, V] into Containing of type JMAP[K, V], where JMAP is a subtype of java.util.Map. This is required to support the explicit Equality syntax, for example:

val javaMap = new java.util.HashMap[Int, String]()
javaMap.put(1, "one")
// lowerCased needs to be implemented as Normalization[java.util.Map.Entry[K, V]]
(javaMap should contain (Entry(1, "ONE"))) (after being lowerCased)

(after being lowerCased) will returns an java.util.Map.Entry[Int, String] and this implicit conversion will convert it into Containing[java.util.HashMap[Int, String]].

Type parameters:
JMAP

any subtype of java.util.Map

K

the type of the key in the java.util.Map

V

the type of the value in the java.util.Map

Value parameters:
equality

Equality of type java.util.Map.Entry[K, V]

Returns:

Containing of type JMAP[K, V]