Package edu.rit.util
Class Searching.Byte
java.lang.Object
edu.rit.util.Searching.Byte
- Enclosing class:
Searching
Class Searching.Byte is the base class for a helper object used to search
an array of type
byte[]
.- Version:
- 22-Nov-2011
- Author:
- Alan Kaminsky
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compare
(byte a, byte b) Compare two elements according to the desired ordering criterion.
-
Constructor Details
-
Byte
public Byte()
-
-
Method Details
-
compare
public int compare(byte a, byte b) Compare two elements according to the desired ordering criterion.The default implementation compares
a
andb
using ascending order. A subclass can override this method to obtain a different ordering criterion; for example, descending order.- Parameters:
a
- First element being compared.b
- Second element being compared.- Returns:
- A number less than, equal to, or greater than 0 if
a
comes before, is the same as, or comes afterb
, respectively.
-