Java tutorial
//package com.java2s; public class Main { static long[] deserializePattern(final String patternString) { final String[] temp = patternString.split("-"); final long[] toReturn = new long[temp.length]; for (int i = 0; i < temp.length; ++i) { toReturn[i] = Long.parseLong(temp[i]); } return toReturn; } }