Interface Dirtyable


public interface Dirtyable
This interface can be implemented to mark an object as dirty-able. An object which is considered "dirty" needs to be saved.
Author:
TheBusyBiscuit
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    This method reads the dirty state.
    void
    markDirty(boolean dirty)
    This method sets the dirty state.
  • Method Details

    • markDirty

      void markDirty(boolean dirty)
      This method sets the dirty state.

      An object is considered "dirty" if the state of the object has been modified since the last time the object has been saved. A dirty object is an object which needs to be saved again. Once the object was saved, it can be marked as non-dirty again.

      Parameters:
      dirty - Whether this object should be dirty or not
    • isDirty

      boolean isDirty()
      This method reads the dirty state. It will return true if the object is currently dirty and false if the object is not dirty.
      Returns:
      Whether this object is dirty