/** * Constructs a new pair from the specified <code>KeyValue</code>. * * @param pair * the pair to copy, must not be null * @param compareByKeyOnly * flag if equals() depends on key only * @throws NullPointerException * if the entry is null */ public DefaultKeyValue(final KeyValue<K, V> pair, final boolean compareByKeyOnly) { this(pair.getKey(), pair.getValue(), compareByKeyOnly); }
public Collection<HstComponentException> getAllComponentExceptions() { if (allExceptions == null) { allExceptions = new ArrayList<HstComponentException>(); for (KeyValue<HstComponentInfo, Collection<HstComponentException>> pair : componentExceptions) { allExceptions.addAll(pair.getValue()); } } return allExceptions; }
public Collection<HstComponentInfo> getComponentInfos() { if (componentInfos == null) { componentInfos = new ArrayList<HstComponentInfo>(); for (KeyValue<HstComponentInfo, Collection<HstComponentException>> pair : componentExceptions) { componentInfos.add(pair.getKey()); } } return componentInfos; }
public List<Element> getHeadElements() { List<Element> elements = new LinkedList<Element>(); if (headElements != null) { for (KeyValue<String, Element> kv : headElements) { elements.add(kv.getValue()); } } return elements; }
public Collection<HstComponentInfo> getComponentInfos() { if (componentInfos == null) { componentInfos = new ArrayList<HstComponentInfo>(); for (KeyValue<HstComponentInfo, Collection<HstComponentException>> pair : componentExceptions) { componentInfos.add(pair.getKey()); } } return componentInfos; }
/** * Constructs a new pair from the specified <code>KeyValue</code>. * * @param pair * the pair to copy, must not be null * @param compareByKeyOnly * flag if equals() depends on key only * @throws NullPointerException * if the entry is null */ public MockKeyValue(final KeyValue<K, V> pair, final boolean compareByKeyOnly) { this(pair.getKey(), pair.getValue(), compareByKeyOnly); }
public List<Element> getHeadElements() { List<Element> elements = new LinkedList<Element>(); if (this.headElements != null) { for (KeyValue<String, Element> kv : this.headElements) { elements.add(kv.getValue()); } } return elements; }
public Collection<HstComponentException> getComponentExceptions(HstComponentInfo componentInfo) { for (KeyValue<HstComponentInfo, Collection<HstComponentException>> pair : componentExceptions) { HstComponentInfo componentInfoKey = pair.getKey(); if (componentInfoKey.getId().equals(componentInfo.getId())) { return pair.getValue(); } } return Collections.emptyList(); }
public Collection<HstComponentException> getAllComponentExceptions() { if (allExceptions == null) { allExceptions = new ArrayList<HstComponentException>(); for (KeyValue<HstComponentInfo, Collection<HstComponentException>> pair : componentExceptions) { allExceptions.addAll(pair.getValue()); } } return allExceptions; }
public Collection<HstComponentException> getComponentExceptions(HstComponentInfo componentInfo) { for (KeyValue<HstComponentInfo, Collection<HstComponentException>> pair : componentExceptions) { HstComponentInfo componentInfoKey = pair.getKey(); if (componentInfoKey.getId().equals(componentInfo.getId())) { return pair.getValue(); } } return Collections.emptyList(); }