Class MonacoDiffEditorModel

java.lang.Object
org.primefaces.extensions.model.monaco.MonacoDiffEditorModel
All Implemented Interfaces:
Serializable

public class MonacoDiffEditorModel extends Object implements Serializable
Immutable Model for the Monaco diff code editor that encapsulates two strings, corresponding to the value of the original and modified editor.
Since:
11.1.0
See Also:
  • Constructor Details

    • MonacoDiffEditorModel

      public MonacoDiffEditorModel()
    • MonacoDiffEditorModel

      public MonacoDiffEditorModel(String originalValue, String modifiedValue)
  • Method Details

    • withOriginal

      public MonacoDiffEditorModel withOriginal(String originalValue)
    • withModified

      public MonacoDiffEditorModel withModified(String modifiedValue)
    • getOriginalValue

      public String getOriginalValue()
      Returns:
      The original text against which perform the comparison.
    • getModifiedValue

      public String getModifiedValue()
      Returns:
      The modified text to compare against the original text.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • isEmpty

      public boolean isEmpty()
      Returns:
      Whether this model is empty, e.g. both the original and modified values are empty.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • empty

      public static MonacoDiffEditorModel empty()
      Returns:
      An empty model with no value.