Package com.nulabinc.zxcvbn.matchers
Class Keyboard.AdjacentGraphBuilder
- java.lang.Object
-
- com.nulabinc.zxcvbn.matchers.Keyboard.AdjacentGraphBuilder
-
- Direct Known Subclasses:
AlignedAdjacentGraphBuilder,SlantedAdjacentGraphBuilder
- Enclosing class:
- Keyboard
public abstract static class Keyboard.AdjacentGraphBuilder extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAdjacentGraphBuilder(java.lang.String layout)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.Character,java.util.List<java.lang.String>>build()builds an adjacency graph as a dictionary: {character: [adjacent_characters]}.protected abstract intcalcSlant(int y)protected abstract java.util.List<com.nulabinc.zxcvbn.matchers.Keyboard.AdjacentGraphBuilder.Position>getAdjacentCoords(com.nulabinc.zxcvbn.matchers.Keyboard.AdjacentGraphBuilder.Position position)abstract booleanisSlanted()
-
-
-
Method Detail
-
build
public java.util.Map<java.lang.Character,java.util.List<java.lang.String>> build()
builds an adjacency graph as a dictionary: {character: [adjacent_characters]}. adjacent characters occur in a clockwise order. for example: on qwerty layout, 'g' maps to ['fF', 'tT', 'yY', 'hH', 'bB', 'vV'] on keypad layout, '7' maps to [None, None, None, '=', '8', '5', '4', None] *
-
getAdjacentCoords
protected abstract java.util.List<com.nulabinc.zxcvbn.matchers.Keyboard.AdjacentGraphBuilder.Position> getAdjacentCoords(com.nulabinc.zxcvbn.matchers.Keyboard.AdjacentGraphBuilder.Position position)
-
calcSlant
protected abstract int calcSlant(int y)
-
isSlanted
public abstract boolean isSlanted()
-
-