Package net.andreinc.mockneat.unit.text
Class Dicts
java.lang.Object
net.andreinc.mockneat.abstraction.MockUnitBase
net.andreinc.mockneat.unit.text.Dicts
public class Dicts extends MockUnitBase
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description java.util.List<java.lang.String>data(DictType type)Returns all data from the dictionary as an immutable list.static Dictsdicts()Returns aDictsobject that can be used to generate data from the library existing dictionaries.MockUnitStringtype(DictType type)Returns a newMockUnitStringthat can be used to generate arbitrary values from a Dictionary (DictType.MockUnitStringtypes(DictType... types)Returns a newMockUnitStringthat can be used to generate arbitrary values from a list of dictionariesDictType.
-
Constructor Details
-
Method Details
-
dicts
Returns a
Dictsobject that can be used to generate data from the library existing dictionaries.A dictionary is an
enummapping a text file containing a set of dataThe file contents are loaded in memory after the first call.
Check
DictTypeto see the comprehensive list.- Returns:
- A re-usable
Dictsobject.
-
type
Returns a new
MockUnitStringthat can be used to generate arbitrary values from a Dictionary (DictType.- Parameters:
type- The type of the dictionary.- Returns:
- A new
MockUnitString
-
types
Returns a newMockUnitStringthat can be used to generate arbitrary values from a list of dictionariesDictType.- Parameters:
types- A var-arg array containing a list of possibleDictTypes.- Returns:
- A mew
MockUnitString
-
data
Returns all data from the dictionary as an immutable list.- Parameters:
type- the dictionary type we want to retrieve- Returns:
- The list of lines from the dict
-