001package jmri;
002
003/**
004 * Tags objects that remember whether they've been modified and need to be
005 * (optionally) stored, for example before the program terminates or when a
006 * window closes.
007 * <p>
008 * The default state of an object is undefined.
009 * <p>
010 * The modified flag is not a bound parameter
011 * <hr>
012 * This file is part of JMRI.
013 * <p>
014 * JMRI is free software; you can redistribute it and/or modify it under the
015 * terms of version 2 of the GNU General Public License as published by the Free
016 * Software Foundation. See the "COPYING" file for a copy of this license.
017 * <p>
018 * JMRI is distributed in the hope that it will be useful, but WITHOUT ANY
019 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
020 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
021 *
022 * @author Bob Jacobsen Copyright (C) 2008
023 * @since 2.1.6
024 */
025public interface ModifiedFlag {
026
027    /**
028     * Set the modified flag to a specific value
029     *
030     * @param flag true if the object has been modified
031     */
032    void setModifiedFlag(boolean flag);
033
034    /**
035     * Get the current value of the modified flag.
036     *
037     * @return true if the object has been modified and needs to be stored
038     */
039    boolean getModifiedFlag();
040}