Class MappedSequences<K>

  • Direct Known Subclasses:
    ClassLiterals, PackageLiterals

    public class MappedSequences<K>
    extends Object
    A multimap from keys of type K to sequences. Such a map can be useful to specify sequences that should only be used in specific contexts, for example sequences that should only be used as components when testing a specific class.
    • Constructor Detail

      • MappedSequences

        public MappedSequences()
    • Method Detail

      • addSequence

        public void addSequence​(K key,
                                Sequence seq)
        Adds a sequence to the set of sequences associated with the given key.
        Parameters:
        key - the key value
        seq - the sequence
      • getSequences

        public SimpleList<Sequence> getSequences​(K key,
                                                 Type desiredType)
        Returns the set of sequences (as a list) that are associated with the given key and create values of the desiredType.
        Parameters:
        key - the key value
        desiredType - the query type
        Returns:
        the list of sequences for the key and query type
      • getAllSequences

        public Set<Sequence> getAllSequences()
        Returns all sequences as the union of all of the sequence collections.
        Returns:
        the set of all sequence objects in this set of collections