com.starbase.util
Class StringCompare

java.lang.Object
  |
  +--com.starbase.util.StringCompare
All Implemented Interfaces:
SortCompare

public class StringCompare
extends java.lang.Object
implements SortCompare


Method Summary
 int compare(java.lang.Object a, java.lang.Object b)
          Compare two Strings.
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 int hashCode()
          returns a unique hash for all instances of this type
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compare

public final int compare(java.lang.Object a,
                         java.lang.Object b)
Compare two Strings. Callback for sort. Effectively returns a-b.
 e.g. +1 (or any positive number) if a > b
       0                          if a == b
      -1 (or any negative number) if a < b

Specified by:
compare in interface SortCompare

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class java.lang.Object
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class java.lang.Object
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.