Oracle® Application Server Web Services UDDI Client API Reference
10g Release 2 (10.1.2)

Part No. B13971-01

oracle.uddi.message.util
Class KeyedReferenceComparatorForCategoryBag

java.lang.Object
  extended byoracle.uddi.message.util.KeyedReferenceComparatorForCategoryBag

All Implemented Interfaces:
java.util.Comparator

public class KeyedReferenceComparatorForCategoryBag
extends java.lang.Object
implements java.util.Comparator

Constructor Summary
KeyedReferenceComparatorForCategoryBag()
           

 

Method Summary
 int compare(java.lang.Object obj1, java.lang.Object obj2)
           Takes two KeyedReference objects and returns 0 if and only if they are equal by the semantics of this type of comparator (see details below).
 boolean equals(java.lang.Object obj)
          Returns true if and only if the parameter object is a Comparator that imposes the same equality/ordering as this Comparator.

 

Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

KeyedReferenceComparatorForCategoryBag

public KeyedReferenceComparatorForCategoryBag()
Method Detail

compare

public int compare(java.lang.Object obj1,
                   java.lang.Object obj2)

Takes two KeyedReference objects and returns 0 if and only if they are equal by the semantics of this type of comparator (see details below). If they are not equal, returns -1. Note that this behavior differs from the general contract of java.util.Comparator intentionally. We do not care about ordering the objects, just about object equality.

Equality semantics: There are two cases to consider for keyedReferences contained within categoryBags. If the tModel key represents the special "general_keywords" builtin category, then kr1 and kr2 are equal if and only if: (kr1.tModelKey == kr2.tModelKey) && (kr1.keyValue == kr2.keyValue) && (kr1.keyName == kr2.keyName). For any other tModel key, kr1 and kr2 are equal if and only if: (kr1.tModelKey == kr2.tModelKey) && (kr1.keyValue == kr2.keyValue).

Specified by:
compare in interface java.util.Comparator

equals

public boolean equals(java.lang.Object obj)
Returns true if and only if the parameter object is a Comparator that imposes the same equality/ordering as this Comparator.
Specified by:
equals in interface java.util.Comparator

Oracle® Application Server Web Services UDDI Client API Reference
10g Release 2 (10.1.2)

Part No. B13971-01

Copyright © 2001, 2004, Oracle. All rights reserved.