Class ScoreNodeMap


  • public final class ScoreNodeMap
    extends Object
    ScoreNodeMap implements a simple mapping of an arbitrary key to an array of ScoreNode[].
    • Constructor Detail

      • ScoreNodeMap

        public ScoreNodeMap()
    • Method Detail

      • addScoreNodes

        public void addScoreNodes​(Object key,
                                  ScoreNode[] nodes)
        Adds scoreNodes to this map under the given key. If there already exists a mapping with the given key the scoreNodes are added to the existing mapping. The add operation works as follows:
        • If the existing value for key is a ScoreNode[], then the value is turned into a List and the existing value as well as the new value are added to the List. Finally the List is uses as the new value for the mapping.
        • If the existing value for key is a List the scoreNodes are simply added to the List.
        Parameters:
        key - the lookup key.
        nodes - the score nodes.
      • getScoreNodes

        public ScoreNode[][] getScoreNodes​(Object key)
        Returns an array of ScoreNode[] for the given key.
        Parameters:
        key - the key.
        Returns:
        an array of ScoreNode[] that match the given key or null if there is none.