Package org.instancio.generator.specs
Interface MapGeneratorSpec<K,V>
- Type Parameters:
K
- key typeV
- value type
- All Superinterfaces:
GeneratorSpec<Map<K,
V>>
- All Known Implementing Classes:
ConcurrentHashMapGenerator
,ConcurrentSkipListMapGenerator
,MapGenerator
,MapGeneratorSpecImpl
,TreeMapGenerator
Generator spec for maps.
-
Method Summary
Modifier and TypeMethodDescriptionmaxSize
(int size) Maximum size of map to generate.minSize
(int size) Minimum size of map to generate.nullable()
Indicates thatnull
value can be generated for the map.Indicates thatnull
values can be generated for map keys.Indicates thatnull
values can be generated for map values.size
(int size) Size of map to generate.Specifies the type of map that should be generated.
-
Method Details
-
size
Size of map to generate.- Parameters:
size
- of map- Returns:
- spec builder
-
minSize
Minimum size of map to generate.- Parameters:
size
- minimum size (inclusive)- Returns:
- spec builder
-
maxSize
Maximum size of map to generate.- Parameters:
size
- maximum size (inclusive)- Returns:
- spec builder
-
nullable
MapGeneratorSpec<K,V> nullable()Indicates thatnull
value can be generated for the map.- Returns:
- spec builder
-
nullableKeys
MapGeneratorSpec<K,V> nullableKeys()Indicates thatnull
values can be generated for map keys.- Returns:
- spec builder
-
nullableValues
MapGeneratorSpec<K,V> nullableValues()Indicates thatnull
values can be generated for map values.- Returns:
- spec builder
-
subtype
Specifies the type of map that should be generated.- Parameters:
type
- of collection to generate- Returns:
- spec builder
- Since:
- 1.4.0
-