org.opentripplanner.netex.loader.util.ReadOnlyHierarchicalMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.netex.loader.util;
/**
* Read only interface for a hierarchical map. This interface proved a interface to a hierarchy of
* maps with a parent - child relationship. Elements are retrieved using ({@link #lookup(Object)}).
* The lookup call check the current instance, then the parent to find an element. This continue
* until the root of the hierarchy is reached. If a {@code key} exist in more than two places in
* the hierarchy, the first value found wins.
*
* @param The key type
* @param Thr value type
*/
public interface ReadOnlyHierarchicalMap {
/**
* Lookup element, if not found delegate up to the parent.
* NB! elements of this class and its parents are NOT merged, the closest win.
* @return an empty collection if no element are found.
*/
V lookup(K key);
/**
* The key exist in this Collection or one of the parents (parent, parent´s parent and so on)
*/
boolean containsKey(K key);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy