Class LanguageMerge

java.lang.Object
fr.fuzeblocks.homeplugin.language.LanguageMerge

public class LanguageMerge extends Object
The type Language merge.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LanguageMerge(File editedFile, File latestFile)
    Instantiates a new Language merge.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Simple merge: copies the edited config, adds missing keys from the latest version, without removing any key.
    void
    Synchronized merge: copies the edited config, adds missing keys, removes keys no longer present in the latest version.
    boolean
    Saves the merged config to the edited file.
    boolean
    pushTo(File destinationFile)
    Push to boolean.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LanguageMerge

      public LanguageMerge(File editedFile, File latestFile)
      Instantiates a new Language merge.
      Parameters:
      editedFile - the edited file
      latestFile - the latest file
  • Method Details

    • mergeAddOnly

      public void mergeAddOnly()
      Simple merge: copies the edited config, adds missing keys from the latest version, without removing any key.
    • mergeSync

      public void mergeSync()
      Synchronized merge: copies the edited config, adds missing keys, removes keys no longer present in the latest version.
    • pushChanges

      public boolean pushChanges()
      Saves the merged config to the edited file.
      Returns:
      true if saving succeeded, false otherwise.
    • pushTo

      public boolean pushTo(File destinationFile)
      Push to boolean.
      Parameters:
      destinationFile - the destination file
      Returns:
      the boolean