001/*
002 * Shredzone Commons - suncalc
003 *
004 * Copyright (C) 2017 Richard "Shred" K├Ârber
005 *   http://commons.shredzone.org
006 *
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
013 */
014package org.shredzone.commons.suncalc.param;
015
016/**
017 * An interface for the method that eventually executes the calculation.
018 *
019 * @param <T>
020 *            Result type
021 */
022public interface Builder<T> {
023
024    /**
025     * Executes the calculation and returns the desired result.
026     * <p>
027     * The resulting object is immutable. You can change parameters, and then invoke
028     * {@link #execute()} again, to get a new object with new results.
029     *
030     * @return Result of the calculation.
031     */
032    T execute();
033
034}