Interface ISequenceBiMap<K,V,S extends Iterable<K>,E extends ISequenceBiMap.IEntry<K,V,S,E,? super M>,M extends ISequenceBiMap<K,V,S,E,? super M>>

All Known Implementing Classes:
EnumSequenceBiMap, NestedSequenceBiMap

public interface ISequenceBiMap<K,V,S extends Iterable<K>,E extends ISequenceBiMap.IEntry<K,V,S,E,? super M>,M extends ISequenceBiMap<K,V,S,E,? super M>>
  • Method Details

    • get

      E get(K key)
      Get the ISequenceBiMap.IEntry associated with this key. Equivalently, the ISequenceBiMap.IEntry associated with the sequence of length 1 containing this key.
      Parameters:
      key -
      Returns:
      null if no ISequenceBiMap.IEntry exists
    • get

      E get(S sequence)
      Get the ISequenceBiMap.IEntry at this exact sequence position.
      Parameters:
      sequence - Not mutated
      Returns:
      ISequenceBiMap.IEntry or null if no entry exists with that sequence.
      See Also:
    • follow

      V follow(S sequence)
      Follow a sequence of keys until a value is found. A key is taken off the start of the sequence and used to find the ISequenceBiMap.IEntry there. If this ISequenceBiMap.IEntry is a value, this is returned. If it is a sub-map, then the process is repeated with the next key.
      Parameters:
      sequence - This is shortened by this operation
      Returns:
      The value found by following the sequence of keys, or null if the sequence reaches a dead end, or the sequence runs out before a value is found.
      See Also:
    • getKeySequenceMap

      Map<V,S> getKeySequenceMap()
      The map of values to the sequences by which those values are indexed.
      Returns:
      Non-null map
      See Also:
    • getKeySequence

      S getKeySequence(V value)
      Essentially a shortcut for getKeySequenceMap().Map.get(Object).
      Parameters:
      value -
      Returns:
      The sequence such that get(sequence) == value, or null if that value is not in this Map
      See Also:
    • values

      Collection<V> values()