@Test public void restrict() throws Exception { ArrayList<String> params = new ArrayList<>(); params.add("key0"); params.add("key3"); rqlData.restrict(params); System.out.println(rqlData.getDataItems().size()); assertTrue(rqlData.getDataItems().size() == 20); }
public void restrict(ArrayList<String> params) { Iterator<RQLSymbol> iterator = dataItems.iterator(); while (iterator.hasNext()) { RQLSymbol entry = iterator.next(); if (!params.contains(entry.getName())) { iterator.remove(); } } }
RQLData { public void restrict(ArrayList<String> params) { Iterator<RQLSymbol> iterator = dataItems.iterator(); while (iterator.hasNext()) { RQLSymbol entry = iterator.next(); if (!params.contains(entry.getName())) { iterator.remove(); } } } }
RQLData { public void restrict(ArrayList<String> params) { Iterator<RQLSymbol> iterator = dataItems.iterator(); while (iterator.hasNext()) { RQLSymbol entry = iterator.next(); if (!params.contains(entry.getName())) { iterator.remove(); } } } RQLData(); }
RQLData { public void restrict(ArrayList<String> params) { Iterator<RQLSymbol> iterator = dataItems.iterator(); while (iterator.hasNext()) { RQLSymbol entry = iterator.next(); if (!params.contains(entry.getName())) { iterator.remove(); } } } RQLData(); String getLogName(); void setLogName(String logName); ArrayList<RQLSymbol> getDataItems(); Timestamp getTimestamp(); void setTimestamp(Timestamp timestamp); void setTimestamp(long hlc); void appendDataItem(RQLSymbol dataItem); void setDataItems(ArrayList<RQLSymbol> dataItems); int getNodeId(); void setNodeId(long nodeId); void setNodeId(int nodeId); void restrict(ArrayList<String> params); }
RQLData { public void restrict(ArrayList<String> params) { Iterator<RQLSymbol> iterator = dataItems.iterator(); while (iterator.hasNext()) { RQLSymbol entry = iterator.next(); if (!params.contains(entry.getName())) { iterator.remove(); } } } RQLData(); String getLogName(); void setLogName(String logName); ArrayList<RQLSymbol> getDataItems(); Timestamp getTimestamp(); void setTimestamp(Timestamp timestamp); void setTimestamp(long hlc); void appendDataItem(RQLSymbol dataItem); void setDataItems(ArrayList<RQLSymbol> dataItems); int getNodeId(); void setNodeId(long nodeId); void setNodeId(int nodeId); void restrict(ArrayList<String> params);  }