Class IvmlOrderedEnumMinMaxOperationDescriptor

  • All Implemented Interfaces:
    IMetaOperation

    public class IvmlOrderedEnumMinMaxOperationDescriptor
    extends IvmlOperationDescriptor
    Represents the minimum or maximum operation for ordered IVML enums.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • IvmlOrderedEnumMinMaxOperationDescriptor

        IvmlOrderedEnumMinMaxOperationDescriptor()
        For serialization.
    • Method Detail

      • isCompatible

        public IMetaOperation.CompatibilityResult isCompatible​(java.lang.Class<?> retType,
                                                               java.lang.Object... params)
        Description copied from interface: IMetaOperation
        Returns whether the operation represented by this instance is compatible to the given return type and parameters. This method does not consider possible unnamed parameter rather than the underlying Java parameter.
        Parameters:
        retType - the return type (may be null in order to ignore this parameter)
        params - the parameters (may be null if there are none, may be classes)
        Returns:
        an instance of IMetaOperation.CompatibilityResult denoting the actual compatibility level
      • min

        private EnumValue min​(EnumValue v1,
                              EnumValue v2)
        Returns the minimum enumeration value.
        Parameters:
        v1 - the first value to compare
        v2 - the second value to compare
        Returns:
        the minimum of both values
      • max

        private EnumValue max​(EnumValue v1,
                              EnumValue v2)
        Returns the maximum enumeration value.
        Parameters:
        v1 - the first value to compare
        v2 - the second value to compare
        Returns:
        the maximum of both values