@Test public void testParse(){ assertEquals(this.testMove, ScrambleMove.parse(this.expectedString)); }
public static ScrambleMove parse(String move) { ScrambleMoves sm = ScrambleMoves.determineMove(move); String sanitizedMove = move.replaceAll("\\s", ""); sanitizedMove = sanitizedMove.substring(sanitizedMove.lastIndexOf(":") + 1, sanitizedMove.length() - 1); String[] moveParts = sanitizedMove.split("(" + ARG_SEP + "|" + COORD_SEP + "|" + COORD_SEP_CAP + ")"); long[] args = new long[moveParts.length]; for (int i = 0; i < moveParts.length; i++) { args[i] = Long.parseLong(moveParts[i]); } return new ScrambleMove(sm, args); }
ScrambleMove { public static ScrambleMove parse(String move) { ScrambleMoves sm = ScrambleMoves.determineMove(move); String sanitizedMove = move.replaceAll("\\s", ""); sanitizedMove = sanitizedMove.substring(sanitizedMove.lastIndexOf(":") + 1, sanitizedMove.length() - 1); String[] moveParts = sanitizedMove.split("(" + ARG_SEP + "|" + COORD_SEP + "|" + COORD_SEP_CAP + ")"); long[] args = new long[moveParts.length]; for (int i = 0; i < moveParts.length; i++) { args[i] = Long.parseLong(moveParts[i]); } return new ScrambleMove(sm, args); } }
ScrambleMove { public static ScrambleMove parse(String move) { ScrambleMoves sm = ScrambleMoves.determineMove(move); String sanitizedMove = move.replaceAll("\\s", ""); sanitizedMove = sanitizedMove.substring(sanitizedMove.lastIndexOf(":") + 1, sanitizedMove.length() - 1); String[] moveParts = sanitizedMove.split("(" + ARG_SEP + "|" + COORD_SEP + "|" + COORD_SEP_CAP + ")"); long[] args = new long[moveParts.length]; for (int i = 0; i < moveParts.length; i++) { args[i] = Long.parseLong(moveParts[i]); } return new ScrambleMove(sm, args); } ScrambleMove(ScrambleMoves move, long ... args); }
ScrambleMove { public static ScrambleMove parse(String move) { ScrambleMoves sm = ScrambleMoves.determineMove(move); String sanitizedMove = move.replaceAll("\\s", ""); sanitizedMove = sanitizedMove.substring(sanitizedMove.lastIndexOf(":") + 1, sanitizedMove.length() - 1); String[] moveParts = sanitizedMove.split("(" + ARG_SEP + "|" + COORD_SEP + "|" + COORD_SEP_CAP + ")"); long[] args = new long[moveParts.length]; for (int i = 0; i < moveParts.length; i++) { args[i] = Long.parseLong(moveParts[i]); } return new ScrambleMove(sm, args); } ScrambleMove(ScrambleMoves move, long ... args); long getArg(int argIndex); void toReverse(); String toKeyString(StringBuilder sbIn, boolean reverse); String toKeyString(); static ScrambleMove parse(String move); static LongLinkedList<ScrambleMove> parseMulti(String moves); static synchronized boolean isUsingOpCode(); static synchronized void useOpCode(boolean use); @Override boolean equals(Object o); @Override int hashCode(); }
ScrambleMove { public static ScrambleMove parse(String move) { ScrambleMoves sm = ScrambleMoves.determineMove(move); String sanitizedMove = move.replaceAll("\\s", ""); sanitizedMove = sanitizedMove.substring(sanitizedMove.lastIndexOf(":") + 1, sanitizedMove.length() - 1); String[] moveParts = sanitizedMove.split("(" + ARG_SEP + "|" + COORD_SEP + "|" + COORD_SEP_CAP + ")"); long[] args = new long[moveParts.length]; for (int i = 0; i < moveParts.length; i++) { args[i] = Long.parseLong(moveParts[i]); } return new ScrambleMove(sm, args); } ScrambleMove(ScrambleMoves move, long ... args); long getArg(int argIndex); void toReverse(); String toKeyString(StringBuilder sbIn, boolean reverse); String toKeyString(); static ScrambleMove parse(String move); static LongLinkedList<ScrambleMove> parseMulti(String moves); static synchronized boolean isUsingOpCode(); static synchronized void useOpCode(boolean use); @Override boolean equals(Object o); @Override int hashCode(); final ScrambleMoves move; }