@Test public void testGetNameFromPath() { assertEquals("foo", SoarQMemoryAdapter.getNameFromPath("foo[1]")); assertEquals("foo", SoarQMemoryAdapter.getNameFromPath("foo[hello there]")); }
static String getNameFromPath(String path) { final String[] pathElements = path.split("\\."); return INDEX_PATTERN.matcher(pathElements[pathElements.length - 1]).replaceFirst(""); }
SoarQMemoryAdapter implements SoarEventListener, QMemoryListener { static String getNameFromPath(String path) { final String[] pathElements = path.split("\\."); return INDEX_PATTERN.matcher(pathElements[pathElements.length - 1]).replaceFirst(""); } }
SoarQMemoryAdapter implements SoarEventListener, QMemoryListener { static String getNameFromPath(String path) { final String[] pathElements = path.split("\\."); return INDEX_PATTERN.matcher(pathElements[pathElements.length - 1]).replaceFirst(""); } SoarQMemoryAdapter(); }
SoarQMemoryAdapter implements SoarEventListener, QMemoryListener { static String getNameFromPath(String path) { final String[] pathElements = path.split("\\."); return INDEX_PATTERN.matcher(pathElements[pathElements.length - 1]).replaceFirst(""); } SoarQMemoryAdapter(); static SoarQMemoryAdapter attach(Agent agent, QMemory source); static SoarQMemoryAdapter attach(InputOutput io, Identifier rootId, QMemory source); void initialize(InputOutput io, Identifier rootId); void detach(); QMemory getSource(); void setSource(QMemory source); Symbol getValue(String path); @Override void onEvent(SoarEvent event); @Override void onQMemoryChanged(); }
SoarQMemoryAdapter implements SoarEventListener, QMemoryListener { static String getNameFromPath(String path) { final String[] pathElements = path.split("\\."); return INDEX_PATTERN.matcher(pathElements[pathElements.length - 1]).replaceFirst(""); } SoarQMemoryAdapter(); static SoarQMemoryAdapter attach(Agent agent, QMemory source); static SoarQMemoryAdapter attach(InputOutput io, Identifier rootId, QMemory source); void initialize(InputOutput io, Identifier rootId); void detach(); QMemory getSource(); void setSource(QMemory source); Symbol getValue(String path); @Override void onEvent(SoarEvent event); @Override void onQMemoryChanged();  }