@Test public void testDirectedList() throws IOException { File tempConfig = File.createTempFile("temp-run-config", ".tmp"); BufferedWriter configWriter = new BufferedWriter(new FileWriter(tempConfig)); configWriter.write("abc=3->10,9->11"); configWriter.close(); NBProperties properties = new NBProperties(tempConfig.getAbsolutePath(), TEST_ALLOWED_PROPERTIES); List<Integer> list = properties.getDirectedPairsListPropertyOrFail("abc"); assertEquals(4, list.size()); assertEquals(3, (int) list.get(0)); assertEquals(10, (int) list.get(1)); assertEquals(9, (int) list.get(2)); assertEquals(11, (int) list.get(3)); assertTrue(tempConfig.delete()); }
public List<Integer> getDirectedPairsListPropertyOrFail(String key) { String list = getPropertyOrFail(key); List<Integer> integerList = new ArrayList<>(); for (String s : list.split(",")) { for (String s2 : s.split("->")) { integerList.add(Integer.valueOf(s2)); } } return integerList; }
NBProperties extends Properties { public List<Integer> getDirectedPairsListPropertyOrFail(String key) { String list = getPropertyOrFail(key); List<Integer> integerList = new ArrayList<>(); for (String s : list.split(",")) { for (String s2 : s.split("->")) { integerList.add(Integer.valueOf(s2)); } } return integerList; } }
NBProperties extends Properties { public List<Integer> getDirectedPairsListPropertyOrFail(String key) { String list = getPropertyOrFail(key); List<Integer> integerList = new ArrayList<>(); for (String s : list.split(",")) { for (String s2 : s.split("->")) { integerList.add(Integer.valueOf(s2)); } } return integerList; } NBProperties(String[]... additionalAllowedProperties);  NBProperties(String fileName, String[]... additionalAllowedProperties); }
NBProperties extends Properties { public List<Integer> getDirectedPairsListPropertyOrFail(String key) { String list = getPropertyOrFail(key); List<Integer> integerList = new ArrayList<>(); for (String s : list.split(",")) { for (String s2 : s.split("->")) { integerList.add(Integer.valueOf(s2)); } } return integerList; } NBProperties(String[]... additionalAllowedProperties);  NBProperties(String fileName, String[]... additionalAllowedProperties); String getPropertyOrFail(String key); boolean isPropertyDefined(String key); int getIntegerPropertyOrFail(String key); boolean getBooleanPropertyOrFail(String key); long getLongPropertyOrFail(String key); double getDoublePropertyOrFail(String key); List<Integer> getDirectedPairsListPropertyOrFail(String key); String getFileName(); Graph getGraph(); GraphDetails getGraphDetails(); String getTopologyFileNameOrFail(); boolean getBooleanPropertyWithDefault(String key, boolean defaultValue); long getLongPropertyWithDefault(String key, long defaultValue); double getDoublePropertyWithDefault(String key, double defaultValue); int getIntegerPropertyWithDefault(String key, int defaultValue); String getPropertyWithDefault(String key, String defaultValue); void overrideProperty(String key, String overrideValue); String getAllPropertiesToString(); }
NBProperties extends Properties { public List<Integer> getDirectedPairsListPropertyOrFail(String key) { String list = getPropertyOrFail(key); List<Integer> integerList = new ArrayList<>(); for (String s : list.split(",")) { for (String s2 : s.split("->")) { integerList.add(Integer.valueOf(s2)); } } return integerList; } NBProperties(String[]... additionalAllowedProperties);  NBProperties(String fileName, String[]... additionalAllowedProperties); String getPropertyOrFail(String key); boolean isPropertyDefined(String key); int getIntegerPropertyOrFail(String key); boolean getBooleanPropertyOrFail(String key); long getLongPropertyOrFail(String key); double getDoublePropertyOrFail(String key); List<Integer> getDirectedPairsListPropertyOrFail(String key); String getFileName(); Graph getGraph(); GraphDetails getGraphDetails(); String getTopologyFileNameOrFail(); boolean getBooleanPropertyWithDefault(String key, boolean defaultValue); long getLongPropertyWithDefault(String key, long defaultValue); double getDoublePropertyWithDefault(String key, double defaultValue); int getIntegerPropertyWithDefault(String key, int defaultValue); String getPropertyWithDefault(String key, String defaultValue); void overrideProperty(String key, String overrideValue); String getAllPropertiesToString();  }