Examples of DeweyDecimal


Examples of org.apache.tools.ant.util.DeweyDecimal

     *
     * @param specificationVersion the specificationVersion of extension
     */
    public void setSpecificationVersion(final String specificationVersion) {
        verifyNotAReference();
        this.specificationVersion = new DeweyDecimal(specificationVersion);
    }
View Full Code Here

Examples of org.apache.tools.ant.util.DeweyDecimal

     *
     * @param implementationVersion the implementationVersion of extension
     */
    public void setImplementationVersion(final String implementationVersion) {
        verifyNotAReference();
        this.implementationVersion = new DeweyDecimal(implementationVersion);
    }
View Full Code Here

Examples of org.apache.tools.ant.util.DeweyDecimal

        this.specificationVendor = specificationVendor;

        if (null != specificationVersion) {
            try {
                this.specificationVersion
                    = new DeweyDecimal(specificationVersion);
            } catch (final NumberFormatException nfe) {
                final String error = "Bad specification version format '"
                    + specificationVersion + "' in '" + specificationTitle
                    + "'. (Reason: " + nfe + ")";
                throw new IllegalArgumentException(error);
View Full Code Here

Examples of org.apache.tools.ant.util.DeweyDecimal

        if (!specificationTitle.equals(other.getSpecificationTitle())) {
            return INCOMPATIBLE;
        }

        // Available specification version must be >= required
        final DeweyDecimal otherSpecificationVersion
            = other.getSpecificationVersion();
        if (null != specificationVersion) {
            if (null == otherSpecificationVersion
                || !isCompatible(specificationVersion, otherSpecificationVersion)) {
                return REQUIRE_SPECIFICATION_UPGRADE;
View Full Code Here

Examples of org.apache.tools.ant.util.DeweyDecimal

        if (null != specificationVendor) {
            attributes.putValue(prefix + SPECIFICATION_VENDOR,
                                 specificationVendor);
        }

        final DeweyDecimal specificationVersion
            = extension.getSpecificationVersion();
        if (null != specificationVersion) {
            attributes.putValue(prefix + SPECIFICATION_VERSION,
                                 specificationVersion.toString());
        }

        final String implementationVendorID
            = extension.getImplementationVendorID();
        if (null != implementationVendorID) {
            attributes.putValue(prefix + IMPLEMENTATION_VENDOR_ID,
                                 implementationVendorID);
        }

        final String implementationVendor = extension.getImplementationVendor();
        if (null != implementationVendor) {
            attributes.putValue(prefix + IMPLEMENTATION_VENDOR,
                                 implementationVendor);
        }

        final DeweyDecimal implementationVersion
            = extension.getImplementationVersion();
        if (null != implementationVersion) {
            attributes.putValue(prefix + IMPLEMENTATION_VERSION,
                                 implementationVersion.toString());
        }

        final String implementationURL = extension.getImplementationURL();
        if (null != implementationURL) {
            attributes.putValue(prefix + IMPLEMENTATION_URL,
View Full Code Here

Examples of org.apache.tools.ant.util.DeweyDecimal

        this.specificationVendor = specificationVendor;

        if (null != specificationVersion) {
            try {
                this.specificationVersion
                    = new DeweyDecimal(specificationVersion);
            } catch (final NumberFormatException nfe) {
                final String error = "Bad specification version format '"
                    + specificationVersion + "' in '" + extensionName
                    + "'. (Reason: " + nfe + ")";
                throw new IllegalArgumentException(error);
            }
        }

        this.implementationURL = implementationURL;
        this.implementationVendor = implementationVendor;
        this.implementationVendorID = implementationVendorId;

        if (null != implementationVersion) {
            try {
                this.implementationVersion
                    = new DeweyDecimal(implementationVersion);
            } catch (final NumberFormatException nfe) {
                final String error = "Bad implementation version format '"
                    + implementationVersion + "' in '" + extensionName
                    + "'. (Reason: " + nfe + ")";
                throw new IllegalArgumentException(error);
View Full Code Here

Examples of org.apache.tools.ant.util.DeweyDecimal

        if (!extensionName.equals(required.getExtensionName())) {
            return INCOMPATIBLE;
        }

        // Available specification version must be >= required
        final DeweyDecimal requiredSpecificationVersion
            = required.getSpecificationVersion();
        if (null != requiredSpecificationVersion) {
            if (null == specificationVersion
                || !isCompatible(specificationVersion, requiredSpecificationVersion)) {
                return REQUIRE_SPECIFICATION_UPGRADE;
            }
        }

        // Implementation Vendor ID must match
        final String requiredImplementationVendorID
            = required.getImplementationVendorID();
        if (null != requiredImplementationVendorID) {
            if (null == implementationVendorID
                || !implementationVendorID.equals(requiredImplementationVendorID)) {
                return REQUIRE_VENDOR_SWITCH;
            }
        }

        // Implementation version must be >= required
        final DeweyDecimal requiredImplementationVersion
            = required.getImplementationVersion();
        if (null != requiredImplementationVersion) {
            if (null == implementationVersion
                || !isCompatible(implementationVersion, requiredImplementationVersion)) {
                return REQUIRE_IMPLEMENTATION_UPGRADE;
View Full Code Here

Examples of org.codehaus.loom.extension.DeweyDecimal

    }

    private int compareSpecVersion( final Extension e1,
                                    final Extension e2 )
    {
        final DeweyDecimal specVersion1 = e1.getSpecificationVersion();
        final DeweyDecimal specVersion2 = e2.getSpecificationVersion();
        if( null == specVersion1 && null == specVersion2 )
        {
            return 0;
        }
        else if( null != specVersion1 && null == specVersion2 )
View Full Code Here

Examples of org.codehaus.loom.extension.DeweyDecimal

    }

    public void testLessThan()
        throws Exception
    {
        final DeweyDecimal dd1 = new DeweyDecimal( DD1 );
        final DeweyDecimal dd2 = new DeweyDecimal( DD2 );
        final DeweyDecimal dd3 = new DeweyDecimal( DD3 );
        final DeweyDecimal dd4 = new DeweyDecimal( DD4 );
        final DeweyDecimal dd5 = new DeweyDecimal( DD5 );
        assertTrue( "Bad: " + DD1 + " <= " + DD1, !dd1.isLessThan( dd1 ) );
        assertTrue( "Bad: " + DD1 + " <= " + DD2, dd1.isLessThan( dd2 ) );
        assertTrue( "Bad: " + DD1 + " <= " + DD3, dd1.isLessThan( dd3 ) );
        assertTrue( "Bad: " + DD1 + " >= " + DD4, !dd1.isLessThan( dd4 ) );
        assertTrue( "Bad: " + DD1 + " <= " + DD5, dd1.isLessThan( dd5 ) );
        assertTrue( "Bad: " + DD2 + " >= " + DD1, !dd2.isLessThan( dd1 ) );
        assertTrue( "Bad: " + DD2 + " <= " + DD2, !dd2.isLessThan( dd2 ) );
        assertTrue( "Bad: " + DD2 + " <= " + DD3, dd2.isLessThan( dd3 ) );
        assertTrue( "Bad: " + DD2 + " >= " + DD4, !dd2.isLessThan( dd4 ) );
        assertTrue( "Bad: " + DD2 + " <= " + DD5, dd2.isLessThan( dd5 ) );
        assertTrue( "Bad: " + DD3 + " >= " + DD1, !dd3.isLessThan( dd1 ) );
        assertTrue( "Bad: " + DD3 + " >= " + DD2, !dd3.isLessThan( dd2 ) );
        assertTrue( "Bad: " + DD3 + " <= " + DD3, !dd3.isLessThan( dd3 ) );
        assertTrue( "Bad: " + DD3 + " >= " + DD4, !dd3.isLessThan( dd4 ) );
        assertTrue( "Bad: " + DD3 + " <= " + DD5, dd3.isLessThan( dd5 ) );
        assertTrue( "Bad: " + DD4 + " <= " + DD1, dd4.isLessThan( dd1 ) );
        assertTrue( "Bad: " + DD4 + " <= " + DD2, dd4.isLessThan( dd2 ) );
        assertTrue( "Bad: " + DD4 + " <= " + DD3, dd4.isLessThan( dd3 ) );
        assertTrue( "Bad: " + DD4 + " <= " + DD4, !dd4.isLessThan( dd4 ) );
        assertTrue( "Bad: " + DD4 + " <= " + DD5, dd4.isLessThan( dd5 ) );
        assertTrue( "Bad: " + DD5 + " >= " + DD1, !dd5.isLessThan( dd1 ) );
        assertTrue( "Bad: " + DD5 + " >= " + DD2, !dd5.isLessThan( dd2 ) );
        assertTrue( "Bad: " + DD5 + " >= " + DD3, !dd5.isLessThan( dd3 ) );
        assertTrue( "Bad: " + DD5 + " >= " + DD4, !dd5.isLessThan( dd4 ) );
        assertTrue( "Bad: " + DD5 + " <= " + DD5, !dd5.isLessThan( dd5 ) );
    }
View Full Code Here

Examples of org.codehaus.loom.extension.DeweyDecimal

    }

    public void testLessThanOrEqual()
        throws Exception
    {
        final DeweyDecimal dd1 = new DeweyDecimal( DD1 );
        final DeweyDecimal dd2 = new DeweyDecimal( DD2 );
        final DeweyDecimal dd3 = new DeweyDecimal( DD3 );
        final DeweyDecimal dd4 = new DeweyDecimal( DD4 );
        final DeweyDecimal dd5 = new DeweyDecimal( DD5 );
        assertTrue( "Bad: " + DD1 + " >= " + DD1,
                    dd1.isLessThanOrEqual( dd1 ) );
        assertTrue( "Bad: " + DD1 + " <= " + DD2,
                    dd1.isLessThanOrEqual( dd2 ) );
        assertTrue( "Bad: " + DD1 + " <= " + DD3,
                    dd1.isLessThanOrEqual( dd3 ) );
        assertTrue( "Bad: " + DD1 + " >= " + DD4,
                    !dd1.isLessThanOrEqual( dd4 ) );
        assertTrue( "Bad: " + DD1 + " <= " + DD5,
                    dd1.isLessThanOrEqual( dd5 ) );
        assertTrue( "Bad: " + DD2 + " >= " + DD1,
                    !dd2.isLessThanOrEqual( dd1 ) );
        assertTrue( "Bad: " + DD2 + " >= " + DD2,
                    dd2.isLessThanOrEqual( dd2 ) );
        assertTrue( "Bad: " + DD2 + " <= " + DD3,
                    dd2.isLessThanOrEqual( dd3 ) );
        assertTrue( "Bad: " + DD2 + " >= " + DD4,
                    !dd2.isLessThanOrEqual( dd4 ) );
        assertTrue( "Bad: " + DD2 + " <= " + DD5,
                    dd2.isLessThanOrEqual( dd5 ) );
        assertTrue( "Bad: " + DD3 + " >= " + DD1,
                    !dd3.isLessThanOrEqual( dd1 ) );
        assertTrue( "Bad: " + DD3 + " >= " + DD2,
                    !dd3.isLessThanOrEqual( dd2 ) );
        assertTrue( "Bad: " + DD3 + " >= " + DD3,
                    dd3.isLessThanOrEqual( dd3 ) );
        assertTrue( "Bad: " + DD3 + " >= " + DD4,
                    !dd3.isLessThanOrEqual( dd4 ) );
        assertTrue( "Bad: " + DD3 + " <= " + DD5,
                    dd3.isLessThanOrEqual( dd5 ) );
        assertTrue( "Bad: " + DD4 + " <= " + DD1,
                    dd4.isLessThanOrEqual( dd1 ) );
        assertTrue( "Bad: " + DD4 + " <= " + DD2,
                    dd4.isLessThanOrEqual( dd2 ) );
        assertTrue( "Bad: " + DD4 + " <= " + DD3,
                    dd4.isLessThanOrEqual( dd3 ) );
        assertTrue( "Bad: " + DD4 + " >= " + DD4,
                    dd4.isLessThanOrEqual( dd4 ) );
        assertTrue( "Bad: " + DD4 + " <= " + DD5,
                    dd4.isLessThanOrEqual( dd5 ) );
        assertTrue( "Bad: " + DD5 + " >= " + DD1,
                    !dd5.isLessThanOrEqual( dd1 ) );
        assertTrue( "Bad: " + DD5 + " >= " + DD2,
                    !dd5.isLessThanOrEqual( dd2 ) );
        assertTrue( "Bad: " + DD5 + " >= " + DD3,
                    !dd5.isLessThanOrEqual( dd3 ) );
        assertTrue( "Bad: " + DD5 + " >= " + DD4,
                    !dd5.isLessThanOrEqual( dd4 ) );
        assertTrue( "Bad: " + DD5 + " >= " + DD5,
                    dd5.isLessThanOrEqual( dd5 ) );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.