List of usage examples for org.apache.commons.collections4 MapIterator getKey
K getKey();
next()
. From source file:femr.util.DataStructure.Mapping.TabFieldMultiMap.java
/** * Checks to see if the map contains an entry for a field * * @param fieldName name of the field//from w ww . j ava 2 s . c o m * @return true if the field has an entry, false otherwise */ public boolean containsTabField(String fieldName) { MapIterator multiMapIterator = this.getMultiMapIterator(); while (multiMapIterator.hasNext()) { multiMapIterator.next(); MultiKey mk = (MultiKey) multiMapIterator.getKey(); if (mk.getKey(0) != null) { if (fieldName.equals(mk.getKey(0))) { return true; } } } return false; }
From source file:femr.util.DataStructure.Mapping.TabFieldMultiMap.java
/** * Checks to see if the map contains any entries for a field * * @param fieldName name of the field * @param chiefComplaint chiefcomplaint that it belongs to (can be null) * @return true if the field has an entry, false otherwise *//*w w w . j ava 2s. co m*/ public boolean containsTabField(String fieldName, String chiefComplaint) { MapIterator multiMapIterator = this.getMultiMapIterator(); while (multiMapIterator.hasNext()) { multiMapIterator.next(); MultiKey mk = (MultiKey) multiMapIterator.getKey(); if (mk.getKey(0) != null && mk.getKey(2) != null) { if (fieldName.equals(mk.getKey(0)) && chiefComplaint.equals(mk.getKey(2))) { return true; } } } return false; }