Package net.andreinc.mockneat.unit.user
Class Passwords
- java.lang.Object
-
- net.andreinc.mockneat.abstraction.MockUnitBase
-
- net.andreinc.mockneat.unit.user.Passwords
-
- All Implemented Interfaces:
MockUnit<java.lang.String>,MockUnitString
public class Passwords extends MockUnitBase implements MockUnitString
-
-
Field Summary
-
Fields inherited from class net.andreinc.mockneat.abstraction.MockUnitBase
mockNeat
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MockUnitStringmedium()This method returns a newMockUnitStringthat can be used to generate passwords with a medium security risk.static Passwordspasswords()Returns aPasswordsobject that can be used to generate arbitrary user passwords.MockUnitStringstrong()This method returns a newMockUnitStringthat can be used to generate strong passwords.java.util.function.Supplier<java.lang.String>supplier()This is the sole abstract method of the interface.MockUnitStringtype(PassStrengthType passStrengthType)This method returns a newMockUnitStringthat can be used to generate passwords of a certain type.MockUnitStringtypes(PassStrengthType... types)This method returns a newMockUnitStringthat can be used to generate passwords of certain type(s).MockUnitStringweak()This method returns a newMockUnitStringthat can be used to generate weak passwords (short english nouns).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods 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, valStr
-
Methods 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 Detail
-
Passwords
public Passwords(MockNeat mockNeat)
-
-
Method Detail
-
passwords
public static Passwords passwords()
Returns a
Passwordsobject that can be used to generate arbitrary user passwords.- Returns:
- A re-usable
Passwordsobject. ThePasswordsclass 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.
-
type
public MockUnitString type(PassStrengthType passStrengthType)
This method returns a new
MockUnitStringthat can be used to generate passwords of a certain type.- Parameters:
passStrengthType- The type of password.- Returns:
- A new
MockUnitString
-
types
public MockUnitString types(PassStrengthType... types)
This method returns a new
MockUnitStringthat can be used to generate passwords of certain type(s).- Parameters:
types- A var-arg array containing the selected password types.- Returns:
- A new
MockUnitString
-
weak
public MockUnitString weak()
This method returns a new
MockUnitStringthat can be used to generate weak passwords (short english nouns).- Returns:
- A new
MockUnitString.
-
medium
public MockUnitString medium()
This method returns a new
MockUnitStringthat can be used to generate passwords with a medium security risk.- Returns:
- A new
MockUnitString.
-
strong
public MockUnitString strong()
This method returns a new
MockUnitStringthat can be used to generate strong passwords.- Returns:
- A new
MockUnitString.
-
-