Class Collections


  • public class Collections
    extends Object
    • Field Detail

      • E

        public static final io.sundr.model.TypeParamDef E
      • K

        public static final io.sundr.model.TypeParamDef K
      • V

        public static final io.sundr.model.TypeParamDef V
      • ITERABLE

        public static final io.sundr.model.TypeDef ITERABLE
      • ITERATOR

        public static final io.sundr.model.TypeDef ITERATOR
      • COLLECTION

        public static final io.sundr.model.TypeDef COLLECTION
      • COLLECTION_REF

        public static final io.sundr.model.ClassRef COLLECTION_REF
      • MAP

        public static final io.sundr.model.TypeDef MAP
      • MAP_REF

        public static final io.sundr.model.ClassRef MAP_REF
      • MAP_ENTRY

        public static final io.sundr.model.TypeDef MAP_ENTRY
      • HASH_MAP

        public static final io.sundr.model.TypeDef HASH_MAP
      • LINKED_HASH_MAP

        public static final io.sundr.model.TypeDef LINKED_HASH_MAP
      • LIST

        public static final io.sundr.model.TypeDef LIST
      • ARRAY_LIST

        public static final io.sundr.model.TypeDef ARRAY_LIST
      • SET

        public static final io.sundr.model.TypeDef SET
      • LINKED_HASH_SET

        public static final io.sundr.model.TypeDef LINKED_HASH_SET
      • IS_LIST

        public static final Function<io.sundr.model.TypeRef,​Boolean> IS_LIST
      • IS_SET

        public static final Function<io.sundr.model.TypeRef,​Boolean> IS_SET
      • IS_MAP

        public static final Function<io.sundr.model.TypeRef,​Boolean> IS_MAP
      • IS_COLLECTION

        public static final Function<io.sundr.model.TypeRef,​Boolean> IS_COLLECTION
      • AS_MAP

        public static final TypeCast AS_MAP
      • AS_COLLECTION

        public static final TypeCast AS_COLLECTION
    • Constructor Detail

      • Collections

        public Collections()
    • Method Detail

      • getCollectionElementType

        public static Optional<io.sundr.model.TypeRef> getCollectionElementType​(io.sundr.model.TypeRef type)
        If the supplied type implements Collection (directly or indirectly), determine its generic element type. Otherwise, return Optional.empty()
      • getMapKeyType

        public static Optional<io.sundr.model.TypeRef> getMapKeyType​(io.sundr.model.TypeRef mapType)
        If the supplied type implements Map (directly or indirectly), determine its generic key type. Otherwise, return Optional.empty()
      • getMapValueType

        public static Optional<io.sundr.model.TypeRef> getMapValueType​(io.sundr.model.TypeRef mapType)
        If the supplied type implements Map (directly or indirectly), determine its generic value type. Otherwise, return Optional.empty()
      • isCollection

        public static boolean isCollection​(io.sundr.model.TypeRef type)
        Checks if a TypeRef is a Collection.
        Parameters:
        type - The type to check.
        Returns:
        True if its a Collection.