Interface Editor<T>

Type Parameters:
T - the type of the exported object
All Superinterfaces:
EditorAction
All Known Implementing Classes:
ListEditor, ValueEditor

public interface Editor<T> extends EditorAction
The Editor
  • Method Details

    • actions

      Map<String,EditorAction> actions()
      The map of all available actions of the editor
      Returns:
      the action map
    • reset

      void reset()
      Reset the editor
    • status

      Object status()
      Get an object representing the status of the editor
      Returns:
      the status
    • export

      Optional<T> export(EditorActor actor)
      Export the object from the editor
      Parameters:
      actor - the actor
      Returns:
      the object if it's exported successfully, otherwise empty
    • migrate

      void migrate(T data)
      Migrate from the object
      Parameters:
      data - the object
    • description

      default String description()
      Description copied from interface: EditorAction
      Get the description of the action
      Specified by:
      description in interface EditorAction
      Returns:
      the description
    • usage

      default String usage()
      Description copied from interface: EditorAction
      Get the usage of the action
      Specified by:
      usage in interface EditorAction
      Returns:
      the usage
    • complete

      default Collection<String> complete(EditorActor actor, String[] args)
      Description copied from interface: EditorAction
      Get the completion suggestions, given the arguments
      Specified by:
      complete in interface EditorAction
      Parameters:
      actor - the action
      args - the argument
      Returns:
      the suggestions
    • execute

      default boolean execute(EditorActor actor, String[] args)
      Description copied from interface: EditorAction
      Execute the action
      Specified by:
      execute in interface EditorAction
      Parameters:
      actor - the actor
      args - the arguments
      Returns:
      true if the action is executed successfully