org.apache.axiom.c14n.helpers
Class AttrCompare
java.lang.Object
org.apache.axiom.c14n.helpers.AttrCompare
- All Implemented Interfaces:
- Serializable, Comparator
public class AttrCompare
- extends Object
- implements Comparator, Serializable
Compares two attributes based on the C14n specification.
- Namespace nodes have a lesser document order position than attribute
nodes.
- An element's namespace nodes are sorted lexicographically by
local name (the default namespace node, if one exists, has no
local name and is therefore lexicographically least).
- An element's attribute nodes are sorted lexicographically with
namespace URI as the primary key and local name as the secondary
key (an empty namespace URI is lexicographically least).
- Author:
- Christian Geuer-Pollmann
modified to work with Axiom wrapper by Saliya Ekanayake (esaliya@gmail.com)
- See Also:
- Serialized Form
Method Summary |
int |
compare(Object obj0,
Object obj1)
Compares two attributes based on the C14n specification. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AttrCompare
public AttrCompare()
compare
public int compare(Object obj0,
Object obj1)
- Compares two attributes based on the C14n specification.
- Namespace nodes have a lesser document order position than
attribute nodes.
- An element's namespace nodes are sorted lexicographically by
local name (the default namespace node, if one exists, has no
local name and is therefore lexicographically least).
- An element's attribute nodes are sorted lexicographically with
namespace URI as the primary key and local name as the secondary
key (an empty namespace URI is lexicographically least).
- Specified by:
compare
in interface Comparator
- Parameters:
obj0
- casted org.apache.axiom.c14n.omwrapper.interfaces.Attrobj1
- casted org.apache.axiom.c14n.omwrapper.interfaces.Attr
- Returns:
- returns a negative integer, zero, or a positive integer as
obj0 is less than, equal to, or greater than obj1
Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.