Package com.nulabinc.zxcvbn.matchers
Class SlantedAdjacentGraphBuilder
- java.lang.Object
-
- com.nulabinc.zxcvbn.matchers.Keyboard.AdjacentGraphBuilder
-
- com.nulabinc.zxcvbn.matchers.SlantedAdjacentGraphBuilder
-
public class SlantedAdjacentGraphBuilder extends Keyboard.AdjacentGraphBuilder
-
-
Constructor Summary
Constructors Constructor Description SlantedAdjacentGraphBuilder(java.lang.String layout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcalcSlant(int y)protected java.util.List<com.nulabinc.zxcvbn.matchers.Keyboard.AdjacentGraphBuilder.Position>getAdjacentCoords(com.nulabinc.zxcvbn.matchers.Keyboard.AdjacentGraphBuilder.Position position)returns the six adjacent coordinates on a standard keyboard, where each row is slanted to the right from the last.booleanisSlanted()-
Methods inherited from class com.nulabinc.zxcvbn.matchers.Keyboard.AdjacentGraphBuilder
build
-
-
-
-
Method Detail
-
getAdjacentCoords
protected java.util.List<com.nulabinc.zxcvbn.matchers.Keyboard.AdjacentGraphBuilder.Position> getAdjacentCoords(com.nulabinc.zxcvbn.matchers.Keyboard.AdjacentGraphBuilder.Position position)
returns the six adjacent coordinates on a standard keyboard, where each row is slanted to the right from the last. adjacencies are clockwise, starting with key to the left, then two keys above, then right key, then two keys below. (that is, only near-diagonal keys are adjacent, so g's coordinate is adjacent to those of t,y,b,v, but not those of r,u,n,c.)- Specified by:
getAdjacentCoordsin classKeyboard.AdjacentGraphBuilder
-
isSlanted
public boolean isSlanted()
- Specified by:
isSlantedin classKeyboard.AdjacentGraphBuilder
-
calcSlant
protected int calcSlant(int y)
- Specified by:
calcSlantin classKeyboard.AdjacentGraphBuilder
-
-