Enum Class OrderlessPresentationMode

java.lang.Object
java.lang.Enum<OrderlessPresentationMode>
com.deltaxml.core.config.OrderlessPresentationMode
All Implemented Interfaces:
Serializable, Comparable<OrderlessPresentationMode>, Constable

public enum OrderlessPresentationMode extends Enum<OrderlessPresentationMode>

Specifies how the child elements of 'orderless' elements should be output.

When the value is A_MATCHES_DELETES_ADDS the output for any orderless comparison is presented in a defined order as follows:
  1. all of the matches from the A input in the same order as they appear in A. In this context matches means elements with these deltaxml:deltaV2 values: 'A=B' and 'A!=B'.
  2. These are followed by 'deletes' (elements which only appear in the 'A' input and have deltaxml:deltaV2='A')
  3. Finally 'adds' (elements which only appear in the 'B' input and have deltaxml:deltaV2='B').

The 'adds' and then the 'deletes' appear in the same order as they appear in their respective inputs.

When the value is A_ADDS all of the elements from the A input appear in the result in the same order as they appear in that input. Their deltaxml:deltaV2 values ('A=B', 'A!=B' and 'A') will indicate if a similar (as defined by exact subtree or key matching) element appears in the B input and if so how they correspond. Finally the 'adds' - elements from B, with no matches to those in the A input, are listed in the order in which they appear in B.

When the value is B_MATCHES_ADDS_DELETES the output is presented as follows:
  1. all of the matches from the B input in the same order as they appear in B. In this context matches means elements with these deltaxml:deltaV2 values: 'A=B' and 'A!=B'.
  2. These are followed by 'adds' (elements which only appear in the 'B' input and have deltaxml:deltaV2='B')
  3. Finally 'deletes' (elements which only appear in the 'A' input and have deltaxml:deltaV2='A').

The 'deletes' and then the 'adds' appear in the same order as they appear in their respective inputs.

When the value is B_DELETES all of the elements from the B input appear in the result in the same order as they appear in that input. Their deltaxml:deltaV2 values ('A=B', 'A!=B' and 'B') will indicate if a similar (as defined by exact subtree or key matching) element appears in the A input and if so how they correspond. Finally the 'deletes' - elements from A, with no matches to those in the B input, are listed in the order in which they appear in A.

The default value for this parameter setting is: B_DELETES

  • Enum Constant Details

    • A_ADDS

      public static final OrderlessPresentationMode A_ADDS

      Outputs elements from the A input, in order, followed by elements only in the B input, in order.

    • A_MATCHES_DELETES_ADDS

      public static final OrderlessPresentationMode A_MATCHES_DELETES_ADDS

      Outputs elements from both inputs in their A order, followed by elements only in A and then elements only in B.

    • B_DELETES

      public static final OrderlessPresentationMode B_DELETES

      Outputs elements from the B input, in order, followed by elements only in the A input, in order.

    • B_MATCHES_ADDS_DELETES

      public static final OrderlessPresentationMode B_MATCHES_ADDS_DELETES

      Outputs elements from both inputs in their B order, followed by elements only in B and then elements only in A.

  • Method Details

    • values

      public static OrderlessPresentationMode[] 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 OrderlessPresentationMode 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
    • isAFirst

      public boolean isAFirst()
    • toString

      public String toString()

      Returns a String representation of OrderlessPresentationMode.

      Overrides:
      toString in class Enum<OrderlessPresentationMode>
      Returns:
      a String representing the OrderlessPresentationMode object
    • getOrderlessPresentationMode

      public static OrderlessPresentationMode getOrderlessPresentationMode(String value)

      Returns a OrderlessPresentationMode object from the supplied String value if appropriate.

      This method should not be used under normal circumstances, enum instance values should be used instead.

      Parameters:
      value - a String representation of a OrderlessPresentationMode value
      Returns:
      the OrderlessPresentationMode instance corresponding to the parameter, or null if the value is invalid