Class Domains
java.lang.Object
net.andreinc.mockneat.abstraction.MockUnitBase
net.andreinc.mockneat.unit.networking.Domains
- All Implemented Interfaces:
MockUnit<java.lang.String>,MockUnitString
public class Domains extends MockUnitBase implements MockUnitString
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description MockUnitStringall()Returns a newMockUnitStringthat can be used to generate domain names, both popular (eg.: "com") or lesser known ("cern", "chat).static Domainsdomains()Returns aDomainsobjectMockUnitStringpopular()Returns a newMockUnitStringthat can be used to generate popular domain names (like: "com", "org", "net", "edu", "gov", "info", "io").java.util.function.Supplier<java.lang.String>supplier()This is the sole abstract method of the interface.MockUnitStringtype(DomainSuffixType type)Returns a newMockUnitStringthat can be used to generate domains based on the specifiedDomainSuffixType.MockUnitStringtypes(DomainSuffixType... types)Returns a newMockUnitStringthat can be used to generate domain names based on the specifiedDomainSuffixTypes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.andreinc.mockneat.abstraction.MockUnit
array, array, collection, collection, collection, collection, collection, collection, consume, consume, get, get, list, list, list, list, list, list, map, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapToDouble, mapToInt, mapToLocalDate, mapToLong, mapToString, mapToString, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, serialize, set, set, set, set, set, set, stream, val, val, valStr, valStrMethods inherited from interface net.andreinc.mockneat.abstraction.MockUnitString
accumulate, append, array, base64, escapeCsv, escapeEcmaScript, escapeHtml, escapeXml, format, md2, md5, noSpecialChars, prepend, replace, replace, replaceAll, replaceFirst, sha1, sha256, sha384, sha512, split, split, sub, sub, urlEncode, urlEncode
-
Constructor Details
-
Method Details
-
domains
Returns a
that can be used to generate domain names. (eg.: "www", "info")DomainsobjectNote: By default "popular" domains will be generated (like: "com", "org", "net", "edu", "gov", "info", "io")
- Returns:
- A re-usable
Domainsobject. TheDomainsclass implementsMockUnitString
-
supplier
public java.util.function.Supplier<java.lang.String> supplier()Description copied from interface:MockUnitThis is the sole abstract method of the interface. Needs to be implemented every-time a MockUnit is implemented. -
popular
Returns a new
MockUnitStringthat can be used to generate popular domain names (like: "com", "org", "net", "edu", "gov", "info", "io").- Returns:
- A new
MockUnitString.
-
all
Returns a new
MockUnitStringthat can be used to generate domain names, both popular (eg.: "com") or lesser known ("cern", "chat).- Returns:
- A new
MockUnitString
-
type
Returns a new
MockUnitStringthat can be used to generate domains based on the specifiedDomainSuffixType.- Parameters:
type- The type of the domains to generated.- Returns:
- A new
MockUnitString
-
types
Returns a new
MockUnitStringthat can be used to generate domain names based on the specifiedDomainSuffixTypes.- Parameters:
types- A var-arg array ofDomainSuffixType.- Returns:
- A new
MockUnitString
-