Skip to content
Snippets Groups Projects
MatrixInitializer.java 560 B
Newer Older
  • Learn to ignore specific revisions
  • Guyslain's avatar
    Guyslain committed
    package datastruct;
    
    
    /**
     * An interface for initializing a {@link Matrix} by providing initial values for each cell.
     *
     * @param <T> The type of values to initialize the {@link Matrix} with.
     */
    
    Guyslain's avatar
    Guyslain committed
    public interface MatrixInitializer<T> {
    
    
        /**
         * Returns the initial value to be set in a {@link Matrix} cell at the specified
         * {@link Coordinate}.
         *
         * @param coordinate The {@link Coordinate} at which to set the initial value.
         * @return The initial value for the specified cell.
         */
    
    Guyslain's avatar
    Guyslain committed
        T initialValueAt(Coordinate coordinate);
    }