Package io.sundr.model.utils
Class Collections
java.lang.Object
io.sundr.model.utils.Collections
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeDefstatic final TypeCaststatic final TypeCaststatic final TypeDefstatic final ClassRefstatic final TypeParamDefstatic final TypeDefstatic final TypeDefstatic final TypeDefstatic final TypeParamDefstatic final TypeDefstatic final TypeDefstatic final TypeDefstatic final TypeDefstatic final TypeDefstatic final ClassRefstatic final TypeDefstatic final TypeParamDef -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIf the supplied type implementsCollection(directly or indirectly), determine its generic element type.getMapKeyType(TypeRef mapType) If the supplied type implementsMap(directly or indirectly), determine its generic key type.getMapValueType(TypeRef mapType) If the supplied type implementsMap(directly or indirectly), determine its generic value type.static booleanisCollection(TypeRef type) Checks if aTypeRefis aCollection.
-
Field Details
-
E
-
K
-
V
-
ITERABLE
-
ITERATOR
-
COLLECTION
-
COLLECTION_REF
-
MAP
-
MAP_REF
-
MAP_ENTRY
-
HASH_MAP
-
LINKED_HASH_MAP
-
LIST
-
ARRAY_LIST
-
SET
-
LINKED_HASH_SET
-
IS_LIST
-
IS_SET
-
IS_MAP
-
IS_COLLECTION
-
AS_MAP
-
AS_COLLECTION
-
-
Constructor Details
-
Collections
public Collections()
-
-
Method Details
-
getCollectionElementType
If the supplied type implementsCollection(directly or indirectly), determine its generic element type. Otherwise, returnOptional.empty() -
getMapKeyType
If the supplied type implementsMap(directly or indirectly), determine its generic key type. Otherwise, returnOptional.empty() -
getMapValueType
If the supplied type implementsMap(directly or indirectly), determine its generic value type. Otherwise, returnOptional.empty() -
isCollection
Checks if aTypeRefis aCollection.- Parameters:
type- The type to check.- Returns:
- True if its a Collection.
-