List of usage examples for javax.management.openmbean TabularData containsKey
public boolean containsKey(Object[] key);
From source file:org.jolokia.converter.json.TabularDataExtractor.java
private CompositeData extractCompositeDataFromPath(TabularData pTd, Stack<String> pPathStack) throws AttributeNotFoundException { // We first try it as a key TabularType type = pTd.getTabularType(); List<String> indexNames = type.getIndexNames(); checkPathFitsIndexNames(pPathStack, indexNames); Object keys[] = new Object[indexNames.size()]; CompositeType rowType = type.getRowType(); List<String> pathPartsUsed = new ArrayList<String>(); for (int i = 0; i < indexNames.size(); i++) { String path = pPathStack.pop(); pathPartsUsed.add(path);/* ww w.j ava 2 s . com*/ keys[i] = getKey(rowType, indexNames.get(i), path); } if (pTd.containsKey(keys)) { return pTd.get(keys); } else { throw new AttributeNotFoundException("No entry with " + pathPartsUsed + " found"); } }