Package com.volantis.mcs.model.validation

Examples of com.volantis.mcs.model.validation.I18NMessage


    public boolean equals(Object obj) {
        if (!(obj instanceof I18NMessage)) {
            return false;
        }

        I18NMessage other = (I18NMessage) obj;
        if (!getKey().equals(other.getKey())) {
            return false;
        }
        final int argumentCount = getArgumentCount();
        if (argumentCount != other.getArgumentCount()) {
            return false;
        }
        for (int i = 0; i < argumentCount; i += 1) {
            final Object argument = getArgument(i);
            final Object otherArgument = other.getArgument(i);
            if (argument == null ? otherArgument != null : !argument.equals(
                    otherArgument)) {
                return false;
            }
        }
View Full Code Here


            this.arguments = arguments;
        }

        boolean matches(Diagnostic diagnostic) {

            I18NMessage message = diagnostic.getMessage();
            int argumentCount = message.getArgumentCount();

            boolean matched;
            if (diagnostic.getPath().getAsString().equals(path)
                    && diagnostic.getLevel() == level
                    && message.getKey().equals(key)
                    && (arguments == null ?
                    argumentCount == 0 :
                    argumentCount == arguments.length)) {

                matched = true;
                for (int a = 0; matched && a < argumentCount; a += 1) {
                    Object expected = arguments[a];
                    Object actual = message.getArgument(a);
                    if (expected == null ?
                            actual != null : !expected.equals(actual)) {
                        matched = false;
                    }
                }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.model.validation.I18NMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.