List<Map<String, String>> elements =
Lists.newArrayListWithCapacity(candidateElements.size());
for (CandidateElementPosition element : candidateElements) {
Eventable eventable = getEventableByCandidateElementInState(state, element);
StateVertex toState = null;
Map<String, String> elementMap = new HashMap<String, String>();
elementMap.put("xpath", element.getXpath());
elementMap
.put("left", "" + (element.getLeft() - 3));
elementMap.put("top", "" + (element.getTop() - 3));
elementMap.put("width", "" + (element.getWidth() + 2));
elementMap.put("height", "" + (element.getHeight() + 2));
if (eventable != null) {
toState = eventable.getTargetStateVertex();
}
if (toState != null) {
elementMap.put("targetname", toState.getName());
if (getStateNumber(toState.getName()) < getStateNumber(state.getName())) {
// state already found