All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sun.xml.wss.impl.c14n.StAXAttrSorter Maven / Gradle / Ivy

There is a newer version: 4.0.3
Show newest version
/*
 * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Distribution License v. 1.0, which is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

/*
 * StAXAttrSorter.java
 *
 * Created on August 22, 2005, 4:22 AM
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package com.sun.xml.wss.impl.c14n;

/**
 *
 * @author root
 */
public class StAXAttrSorter extends AttrSorter {
    
    /** Creates a new instance of StAXAttrSorter */
    public StAXAttrSorter (boolean value) {
        super (value);
    }
    
   protected int sortAttributes (Object object, Object object0) {
        StAXAttr attr = (StAXAttr)object;
        StAXAttr attr0 = (StAXAttr)object0;
        String uri = attr.getUri ();
        String uri0 = attr0.getUri ();
        int result = uri.compareTo (uri0);
        if(result == 0){
            String lN = attr.getLocalName ();
            String lN0 = attr0.getLocalName ();
            result = lN.compareTo (lN0);
        }
        return result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy