NB5 Docs► Reference Section► Binding Functions▼ pre-made functions 🖺

Functions in this category are meant to provide easy grab-and-go functions that are tailored for real-world simulation. This library will grow over time. These functions are often built directly on top of other functions in the core libraries. However, they are provided here for simplicity in workload construction. They perform exactly the same as their longer-form equivalents.

Cities

Return a valid city name.

CitiesByDensity

Return a city name, weighted by population density.

CitiesByPopulation

Return a city name, weighted by total population.

Counties

Return a valid county name.

CountiesByDensity

Return a county name weighted by population density.

CountiesByPopulation

Return a county name weighted by total population.

CountryCodes

Return a valid country code.

CountryNames

Return a valid country name.

FirstNames

Return a pseudo-randomly sampled first name from the last US census data on first names occurring more than 100 times. Both male and female names are combined in this function.

FullNames

Combines the FirstNames and LastNames functions into one that simply concatenates them with a space between. This function is a shorthand equivalent of {@code Template('{} {}', FirstNames(), LastNames())}

LastNames

Return a pseudo-randomly sampled last name from the last US census data on last names occurring more than 100 times.

NumberNameToString

Provides the spelled-out name of a number. For example, an input of 7 would yield "seven". An input of 4234 yields the value "four thousand thirty four". The maximum value is limited at 999,999,999.

StateCodes

Return a valid state code. (abbreviation)

StateCodesByDensity

Return a state code (abbreviation), weighted by population density.

StateCodesByPopulation

Return a state code (abbreviation), weighted by population.

StateNames

Return a valid state name.

StateNamesByDensity

Return a state name, weighted by population density.

StateNamesByPopulation

Return a state name, weighted by total population.

TimeZones

Return a state name, weighted by population density.

TimeZonesByDensity

Return a state name, weighted by population density.

TimeZonesByPopulation

Return a state name, weighted by population.

ToMD5ByteBuffer

Converts the byte image of the input long to a MD5 digest in ByteBuffer form. Deprecated usage due to unsafe MD5 digest. Replaced with DigestToByteBuffer with MD5 when absolutely needed for existing NB tests. However, stronger encryption algorithms (e.g. SHA-256) are recommended due to MD5's limitations.

ZipCodes

Return a valid zip code.

ZipCodesByDensity

Return a zip code, weighted by population density.

ZipCodesByPopulation

Return a zip code, weighted by population.

Back to top