Class MonacoDiffEditorModel
- java.lang.Object
-
- org.primefaces.extensions.model.monaco.MonacoDiffEditorModel
-
- All Implemented Interfaces:
java.io.Serializable
public class MonacoDiffEditorModel extends java.lang.Object implements java.io.SerializableImmutable 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MonacoDiffEditorModel()MonacoDiffEditorModel(java.lang.String originalValue, java.lang.String modifiedValue)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MonacoDiffEditorModelempty()booleanequals(java.lang.Object obj)java.lang.StringgetModifiedValue()java.lang.StringgetOriginalValue()inthashCode()booleanisEmpty()java.lang.StringtoString()MonacoDiffEditorModelwithModified(java.lang.String modifiedValue)MonacoDiffEditorModelwithOriginal(java.lang.String originalValue)
-
-
-
Method Detail
-
withOriginal
public MonacoDiffEditorModel withOriginal(java.lang.String originalValue)
-
withModified
public MonacoDiffEditorModel withModified(java.lang.String modifiedValue)
-
getOriginalValue
public java.lang.String getOriginalValue()
- Returns:
- The original text against which perform the comparison.
-
getModifiedValue
public java.lang.String getModifiedValue()
- Returns:
- The modified text to compare against the original text.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
isEmpty
public boolean isEmpty()
- Returns:
- Whether this model is empty, e.g. both the original and modified values are empty.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
empty
public static MonacoDiffEditorModel empty()
- Returns:
- An empty model with no value.
-
-