Class BlockMap<V>

  • Type Parameters:
    V - value class.
    All Implemented Interfaces:
    Function<Block<?,​?>,​V>, Mapping<Block<?,​?>,​V>, MutableMapping<Block<?,​?>,​V>

    public class BlockMap<V>
    extends Object
    implements MutableMapping<Block<?,​?>,​V>
    Class for associating arbitrary values with the blocks of a minimization result.

    The storage and lookup are performed in constant time.

    • Constructor Detail

      • BlockMap

        public BlockMap​(MinimizationResult<?,​?> minResult)
        Constructor.
        Parameters:
        minResult - the result structure.
    • Method Detail

      • get

        public V get​(Block<?,​?> block)
        Retrieves a value.
        Specified by:
        get in interface Mapping<Block<?,​?>,​V>
        Parameters:
        block - the block.
        Returns:
        the associated value.
      • put

        public V put​(Block<?,​?> block,
                     V value)
        Stores a value.
        Specified by:
        put in interface MutableMapping<Block<?,​?>,​V>
        Parameters:
        block - the associated block.
        value - the value.
      • values

        public Collection<V> values()
        Retrieves all values that are stored in this map.
        Returns:
        the values that are stored in this map.