CS2 and Java's comparator interface

  • Authors:
  • Robert McCloskey;John Beidler;Yaodong Bi

  • Affiliations:
  • Department of Computing Sciences, University of Scranton, Scranton, PA;Department of Computing Sciences, University of Scranton, Scranton, PA;Department of Computing Sciences, University of Scranton, Scranton, PA

  • Venue:
  • Journal of Computing Sciences in Colleges
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper discusses the distinct roles of Java's Comparable and Comparator interfaces for addressing natural orderings and application-specific orderings, respectively. We illustrate the Comparator interface as a tool for software reuse with examples of multi-key and indirect orderings.