Class Trs

    • Method Detail

      • getOrder

        public static int getOrder​(ChangeEvent event)
        Returns the change event order as an int value.

        The TRS specification indicates a change event order is an XSD Integer. Such value should be represented with a Java BigInteger. This is what Lyo 5.0 does, but before that it was represented with Java int value.

        This method shall be used only when compatibility with all versions of Lyo is desired and when it is expected the change event orders do no exceed what can be represented with an int value.

        If Lyo 5.0 or higher is used, the conversion from BigInteger to an int is analogous to a narrowing primitive conversion from long to int, as defined in section 5.1.3 of The Javaâ„¢ Language Specification: if this BigInteger is too big to fit in an int, only the low-order 32 bits are returned. Note that this conversion can lose information about the overall magnitude of the BigInteger value as well as return a result with the opposite sign.

        Parameters:
        event - the change event
        Returns:
        the change event converted to an int value.
        Since:
        3.4.0
      • setOrder

        public static void setOrder​(ChangeEvent event,
                                    int order)
        Assigns the given order to the change event.

        The TRS specification indicates a change event order is an XSD Integer. Such value should be represented with a Java BigInteger. This is what Lyo 5.0 does, but before that it was represented with Java int value.

        This method shall be used only when compatibility with all versions of Lyo is desired and when it is expected the change event orders do no exceed what can be represented with an int value.

        Parameters:
        event - the change event
        order - the order to assign
        Since:
        3.4.0
      • getInstance

        public static Trs getInstance()