Enum Class MetisDataDifference

java.lang.Object
java.lang.Enum<MetisDataDifference>
io.github.tonywasher.joceanus.metis.data.MetisDataDifference
All Implemented Interfaces:
Serializable, Comparable<MetisDataDifference>, Constable

public enum MetisDataDifference extends Enum<MetisDataDifference>
Difference enum and utility.
  • Enum Constant Details

  • Method Details

    • values

      public static MetisDataDifference[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MetisDataDifference valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<MetisDataDifference>
    • isDifferent

      public boolean isDifferent()
      Is there differences?
      Returns:
      true/false
    • isIdentical

      public boolean isIdentical()
      Is there no differences?
      Returns:
      true/false
    • isValueChanged

      public boolean isValueChanged()
      Is there value differences?
      Returns:
      true/false
    • isSecurityChanged

      public boolean isSecurityChanged()
      Is there security differences?
      Returns:
      true/false
    • combine

      public MetisDataDifference combine(MetisDataDifference pThat)
      Combine Differences.
      Parameters:
      pThat - the difference to combine
      Returns:
      the combined difference
    • difference

      public static MetisDataDifference difference(Object pCurr, Object pNew)
      Determine whether two Generic objects differ.
      Parameters:
      pCurr - The current object
      pNew - The new object
      Returns:
      the Difference between the objects
    • isEqual

      public static boolean isEqual(Object pCurr, Object pNew)
      Determine whether two Generic objects are equal.
      Parameters:
      pCurr - The current object
      pNew - The new object
      Returns:
      true/false
    • compareObject

      public static <X extends Comparable<? super X>> int compareObject(X pCurr, X pNew)
      Compare two similar objects for order.
      Type Parameters:
      X - the object type
      Parameters:
      pCurr - The current object
      pNew - The new object
      Returns:
      order
    • compareObject

      public static <X extends Comparable<? super X>> int compareObject(X pCurr, X pNew, boolean pNullLast)
      Compare two similar objects for order.
      Type Parameters:
      X - the object type
      Parameters:
      pCurr - The current object
      pNew - The new object
      pNullLast - is Null at end of list?
      Returns:
      order