Class AssertMessages


  • public final class AssertMessages
    extends Object
    Provides standard error messages for assertions.
    Since:
    13.0
    Version:
    17.0 2020-01-04 14:41:35
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    vmutils
    • Method Detail

      • ccwParameters

        @Pure
        public static String ccwParameters​(int... parameterIndexes)
        Parameters must be defined in CCW order.
        Parameters:
        parameterIndexes - the indexes of the formal parameters.
        Returns:
        the error message.
      • invalidFalseValue

        @Pure
        public static String invalidFalseValue​(int parameterIndex,
                                               String functionName)
        The value of Parameter must be true.
        Parameters:
        parameterIndex - the index of the formal parameter.
        functionName - the name of the function that should reply true.
        Returns:
        the error message.
      • invalidFalseValue

        @Pure
        public static String invalidFalseValue​(String functionName)
        The value of first Parameter must be true.
        Parameters:
        functionName - the name of the function that should reply true.
        Returns:
        the error message.
      • invalidTrueValue

        @Pure
        public static String invalidTrueValue​(int parameterIndex,
                                              String functionName)
        The value of Parameter must be false.
        Parameters:
        parameterIndex - the index of the formal parameter.
        functionName - the name of the function that should reply false.
        Returns:
        the error message.
      • invalidTrueValue

        @Pure
        public static String invalidTrueValue​(String functionName)
        The value of first Parameter must be false.
        Parameters:
        functionName - the name of the function that should reply false.
        Returns:
        the error message.
      • invalidValue

        @Pure
        public static String invalidValue()
        The value of Parameter is invalid.
        Returns:
        the error message.
      • invalidValue

        @Pure
        public static String invalidValue​(int parameterIndex)
        The value of Parameter is invalid.
        Parameters:
        parameterIndex - the index of the formal parameter.
        Returns:
        the error message.
      • lowerEqualParameter

        @Pure
        public static String lowerEqualParameter​(int aindex,
                                                 Object avalue,
                                                 Object value)
        Parameter A must be lower than or equal to the given value.
        Parameters:
        aindex - the index of the parameter A.
        avalue - the value of the parameter A.
        value - the value.
        Returns:
        the error message.
      • lowerEqualParameters

        @Pure
        public static String lowerEqualParameters​(int aindex,
                                                  Object avalue,
                                                  int bindex,
                                                  Object bvalue)
        Parameter A must be lower than or equal to Parameter B.
        Parameters:
        aindex - the index of the parameter A.
        avalue - the value of the parameter A.
        bindex - the index of the parameter B.
        bvalue - the value of the parameter B.
        Returns:
        the error message.
      • negativeOrZeroParameter

        @Pure
        public static String negativeOrZeroParameter()
        Negative or zero parameter.
        Returns:
        the error message.
      • negativeOrZeroParameter

        @Pure
        public static String negativeOrZeroParameter​(int parameterIndex)
        Negative or zero parameter.
        Parameters:
        parameterIndex - the index of the formal parameter.
        Returns:
        the error message.
      • normalizedParameter

        @Pure
        public static String normalizedParameter()
        First parameter must be normalized.
        Returns:
        the error message.
      • normalizedParameter

        @Pure
        public static String normalizedParameter​(int parameterIndex)
        Parameter must be normalized.
        Parameters:
        parameterIndex - the index of the formal parameter.
        Returns:
        the error message.
      • normalizedParameters

        @Pure
        public static String normalizedParameters​(int... parameterIndexes)
        Parameters must be normalized together.
        Parameters:
        parameterIndexes - the indexes of the formal parameters.
        Returns:
        the error message.
      • notNullParameter

        @Pure
        public static String notNullParameter()
        First parameter must be not null.
        Returns:
        the error message.
      • notNullParameter

        @Pure
        public static String notNullParameter​(int parameterIndex)
        Parameter must be not null.
        Parameters:
        parameterIndex - the index of the formal parameter.
        Returns:
        the error message.
      • oneNotNullParameter

        @Pure
        public static String oneNotNullParameter​(int... parameterIndexes)
        One of the parameters must be not null.
        Parameters:
        parameterIndexes - the indexes of the formal parameters.
        Returns:
        the error message.
      • outsideRangeInclusiveParameter

        @Pure
        public static String outsideRangeInclusiveParameter​(int parameterIndex,
                                                            Object currentValue,
                                                            Object minValue,
                                                            Object maxValue)
        Value is outside range.
        Parameters:
        parameterIndex - the index of the formal parameter.
        currentValue - current value.
        minValue - minimum value in range.
        maxValue - maximum value in range.
        Returns:
        the error message.
      • outsideRangeInclusiveParameter

        @Pure
        public static String outsideRangeInclusiveParameter​(Object currentValue,
                                                            Object minValue,
                                                            Object maxValue)
        First parameter value is outside range.
        Parameters:
        currentValue - current value.
        minValue - minimum value in range.
        maxValue - maximum value in range.
        Returns:
        the error message.
      • positiveOrZeroParameter

        @Pure
        public static String positiveOrZeroParameter()
        Positive or zero parameter.
        Returns:
        the error message.
      • positiveOrZeroParameter

        @Pure
        public static String positiveOrZeroParameter​(int parameterIndex)
        Positive or zero parameter.
        Parameters:
        parameterIndex - the index of the formal parameter.
        Returns:
        the error message.
      • positiveStrictlyParameter

        @Pure
        public static String positiveStrictlyParameter()
        Positive parameter.
        Returns:
        the error message.
      • positiveStrictlyParameter

        @Pure
        public static String positiveStrictlyParameter​(int parameterIndex)
        Positive parameter.
        Parameters:
        parameterIndex - the index of the formal parameter.
        Returns:
        the error message.
      • tooSmallArrayParameter

        @Pure
        public static String tooSmallArrayParameter​(int currentSize,
                                                    int expectedSize)
        Size of the first array parameter is too small.
        Parameters:
        currentSize - current size of the array.
        expectedSize - expected size.
        Returns:
        the error message.
      • tooSmallArrayParameter

        @Pure
        public static String tooSmallArrayParameter​(int parameterIndex,
                                                    int currentSize,
                                                    int expectedSize)
        Size of the array parameter is too small.
        Parameters:
        parameterIndex - the index of the formal parameter.
        currentSize - current size of the array.
        expectedSize - expected size.
        Returns:
        the error message.
      • unsupportedPrimitiveType

        @Pure
        public static String unsupportedPrimitiveType()
        Unsupported primitive type.
        Returns:
        the error message.