Interface InstanceOfAssertFactories

  • All Known Implementing Classes:
    Assertions

    public interface InstanceOfAssertFactories
    Guava InstanceOfAssertFactories for Assert.asInstanceOf(InstanceOfAssertFactory).
    Since:
    3.3.0
    Author:
    Stefano Cordio
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.assertj.core.api.InstanceOfAssertFactory<com.google.common.io.ByteSource,​ByteSourceAssert> BYTE_SOURCE
      InstanceOfAssertFactory for a ByteSource.
      static org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Multimap,​MultimapAssert<Object,​Object>> MULTIMAP
      InstanceOfAssertFactory for a Multimap, assuming Object as key and value types.
      static org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Multiset,​MultisetAssert<Object>> MULTISET
      InstanceOfAssertFactory for a Multiset, assuming Object as element type.
      static org.assertj.core.api.InstanceOfAssertFactory<com.google.common.base.Optional,​OptionalAssert<Object>> OPTIONAL
      InstanceOfAssertFactory for an Optional, assuming Object as value type.
      static org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Table,​TableAssert<Object,​Object,​Object>> TABLE
      InstanceOfAssertFactory for a Table, assuming Object as row key type, column key type and value type.
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static <K,​V>
      org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Multimap,​MultimapAssert<K,​V>>
      multimap​(Class<K> keyType, Class<V> valueType)
      InstanceOfAssertFactory for a Multimap.
      static <ELEMENT> org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Multiset,​MultisetAssert<ELEMENT>> multiset​(Class<ELEMENT> elementType)
      InstanceOfAssertFactory for a Multiset.
      static <VALUE> org.assertj.core.api.InstanceOfAssertFactory<com.google.common.base.Optional,​OptionalAssert<VALUE>> optional​(Class<VALUE> resultType)
      InstanceOfAssertFactory for an Optional.
      static <C extends Comparable<C>>
      org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Range,​RangeAssert<C>>
      range​(Class<C> comparableType)
      InstanceOfAssertFactory for a Range.
      static <K extends Comparable<K>,​V>
      org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.RangeMap,​RangeMapAssert<K,​V>>
      rangeMap​(Class<K> keyType, Class<V> valueType)
      InstanceOfAssertFactory for a RangeMap.
      static <R,​C,​V>
      org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Table,​TableAssert<R,​C,​V>>
      table​(Class<R> rowKeyType, Class<C> columnKeyType, Class<V> valueType)
      InstanceOfAssertFactory for a Table.
    • Field Detail

      • BYTE_SOURCE

        static final org.assertj.core.api.InstanceOfAssertFactory<com.google.common.io.ByteSource,​ByteSourceAssert> BYTE_SOURCE
        InstanceOfAssertFactory for a ByteSource.
      • MULTIMAP

        static final org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Multimap,​MultimapAssert<Object,​Object>> MULTIMAP
        InstanceOfAssertFactory for a Multimap, assuming Object as key and value types.
        See Also:
        multimap(Class, Class)
      • OPTIONAL

        static final org.assertj.core.api.InstanceOfAssertFactory<com.google.common.base.Optional,​OptionalAssert<Object>> OPTIONAL
        InstanceOfAssertFactory for an Optional, assuming Object as value type.
        See Also:
        optional(Class)
      • TABLE

        static final org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Table,​TableAssert<Object,​Object,​Object>> TABLE
        InstanceOfAssertFactory for a Table, assuming Object as row key type, column key type and value type.
        See Also:
        table(Class, Class, Class)
      • MULTISET

        static final org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Multiset,​MultisetAssert<Object>> MULTISET
        InstanceOfAssertFactory for a Multiset, assuming Object as element type.
        See Also:
        multiset(Class)
    • Method Detail

      • multimap

        static <K,​V> org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Multimap,​MultimapAssert<K,​V>> multimap​(Class<K> keyType,
                                                                                                                                                     Class<V> valueType)
        InstanceOfAssertFactory for a Multimap.
        Type Parameters:
        K - the Multimap key type.
        V - the Multimap value type.
        Parameters:
        keyType - the key type instance.
        valueType - the value type instance.
        Returns:
        the factory instance.
        See Also:
        MULTIMAP
      • optional

        static <VALUE> org.assertj.core.api.InstanceOfAssertFactory<com.google.common.base.Optional,​OptionalAssert<VALUE>> optional​(Class<VALUE> resultType)
        InstanceOfAssertFactory for an Optional.
        Type Parameters:
        VALUE - the Optional value type.
        Parameters:
        resultType - the value type instance.
        Returns:
        the factory instance.
        See Also:
        OPTIONAL
      • range

        static <C extends Comparable<C>> org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Range,​RangeAssert<C>> range​(Class<C> comparableType)
        InstanceOfAssertFactory for a Range.
        Type Parameters:
        C - the Comparable type.
        Parameters:
        comparableType - the comparable type instance.
        Returns:
        the factory instance.
      • rangeMap

        static <K extends Comparable<K>,​V> org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.RangeMap,​RangeMapAssert<K,​V>> rangeMap​(Class<K> keyType,
                                                                                                                                                                           Class<V> valueType)
        InstanceOfAssertFactory for a RangeMap.
        Type Parameters:
        K - the RangeMap key type.
        V - the RangeMap value type.
        Parameters:
        keyType - the key type instance.
        valueType - the value type instance.
        Returns:
        the factory instance.
      • table

        static <R,​C,​V> org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Table,​TableAssert<R,​C,​V>> table​(Class<R> rowKeyType,
                                                                                                                                                            Class<C> columnKeyType,
                                                                                                                                                            Class<V> valueType)
        InstanceOfAssertFactory for a Table.
        Type Parameters:
        R - the Table row key type.
        C - the Table column key type.
        V - the Table value type.
        Parameters:
        rowKeyType - the row key type instance.
        columnKeyType - the column key type instance.
        valueType - the value type instance.
        Returns:
        the factory instance.
        See Also:
        TABLE
      • multiset

        static <ELEMENT> org.assertj.core.api.InstanceOfAssertFactory<com.google.common.collect.Multiset,​MultisetAssert<ELEMENT>> multiset​(Class<ELEMENT> elementType)
        InstanceOfAssertFactory for a Multiset.
        Type Parameters:
        ELEMENT - the Multiset element type.
        Parameters:
        elementType - the element type instance.
        Returns:
        the factory instance.
        See Also:
        MULTISET