Java™ Platform
Standard Ed. 6

Uses of Interface
java.lang.Comparable

Packages that use Comparable
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images. 
java.io Provides for system input and output through data streams, serialization and the file system. 
java.lang Provides classes that are fundamental to the design of the Java programming language. 
java.lang.annotation Provides library support for the Java programming language annotation facility. 
java.lang.management Provides the management interface for monitoring and management of the Java virtual machine as well as the operating system on which the Java virtual machine is running. 
java.math Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal). 
java.net Provides the classes for implementing networking applications. 
java.nio Defines buffers, which are containers for data, and provides an overview of the other NIO packages. 
java.nio.charset Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters. 
java.security Provides the classes and interfaces for the security framework. 
java.sql Provides the API for accessing and processing data stored in a data source (usually a relational database) using the JavaTM programming language. 
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages. 
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array). 
java.util.concurrent Utility classes commonly useful in concurrent programming. 
javax.annotation   
javax.imageio.metadata A package of the Java Image I/O API dealing with reading and writing metadata. 
javax.jws   
javax.jws.soap   
javax.lang.model Classes and hierarchies of packages used to model the Java programming language. 
javax.lang.model.element Interfaces used to model elements of the Java programming language. 
javax.lang.model.type Interfaces used to model Java programming language types. 
javax.management Provides the core classes for the Java Management Extensions. 
javax.management.openmbean Provides the open data types and Open MBean descriptor classes. 
javax.naming Provides the classes and interfaces for accessing naming services. 
javax.naming.ldap Provides support for LDAPv3 extended operations and controls. 
javax.net.ssl Provides classes for the secure socket package. 
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms. 
javax.swing.event Provides for events fired by Swing components. 
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components. 
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors. 
javax.tools Provides interfaces for tools which can be invoked from a program, for example, compilers. 
javax.xml.bind.annotation Defines annotations for customizing Java program elements to XML Schema mapping. 
javax.xml.ws This package contains the core JAX-WS APIs. 
javax.xml.ws.handler This package defines APIs for message handlers. 
 

Uses of Comparable in java.awt
 

Classes in java.awt that implement Comparable
static class Component.BaselineResizeBehavior
          Enumeration of the common ways the baseline of a component can change as the size changes.
static class Desktop.Action
          Represents an action type.
static class Dialog.ModalExclusionType
          Any top-level window can be marked not to be blocked by modal dialogs.
static class Dialog.ModalityType
          Modal dialogs block all input to some top-level windows.
static class MultipleGradientPaint.ColorSpaceType
          The color space in which to perform the gradient interpolation.
static class MultipleGradientPaint.CycleMethod
          The method to use when painting outside the gradient bounds.
static class TrayIcon.MessageType
          The message type determines which icon will be displayed in the caption of the message, and a possible system sound a message may generate upon showing.
 

Uses of Comparable in java.io
 

Classes in java.io that implement Comparable
 class File
          An abstract representation of file and directory pathnames.
 class ObjectStreamField
          A description of a Serializable field from a Serializable class.
 

Uses of Comparable in java.lang
 

Classes in java.lang that implement Comparable
 class Boolean
          The Boolean class wraps a value of the primitive type boolean in an object.
 class Byte
          The Byte class wraps a value of primitive type byte in an object.
 class Character
          The Character class wraps a value of the primitive type char in an object.
 class Double
          The Double class wraps a value of the primitive type double in an object.
 class Enum<E extends Enum<E>>
          This is the common base class of all Java language enumeration types.
 class Float
          The Float class wraps a value of primitive type float in an object.
 class Integer
          The Integer class wraps a value of the primitive type int in an object.
 class Long
          The Long class wraps a value of the primitive type long in an object.
 class Short
          The Short class wraps a value of primitive type short in an object.
 class String
          The String class represents character strings.
static class Thread.State
          A thread state.
 

Uses of Comparable in java.lang.annotation
 

Classes in java.lang.annotation that implement Comparable
 class ElementType
          A program element type.
 class RetentionPolicy
          Annotation retention policy.
 

Uses of Comparable in java.lang.management
 

Classes in java.lang.management that implement Comparable
 class MemoryType
          Types of memory pools.
 

Uses of Comparable in java.math
 

Classes in java.math that implement Comparable
 class BigDecimal
          Immutable, arbitrary-precision signed decimal numbers.
 class BigInteger
          Immutable arbitrary-precision integers.
 class RoundingMode
          Specifies a rounding behavior for numerical operations capable of discarding precision.
 

Uses of Comparable in java.net
 

Classes in java.net that implement Comparable
static class Authenticator.RequestorType
          The type of the entity requesting authentication.
static class Proxy.Type
          Represents the proxy type.
 class URI
          Represents a Uniform Resource Identifier (URI) reference.
 

Uses of Comparable in java.nio
 

Classes in java.nio that implement Comparable
 class ByteBuffer
          A byte buffer.
 class CharBuffer
          A character buffer.
 class DoubleBuffer
          A double buffer.
 class FloatBuffer
          A float buffer.
 class IntBuffer
          An int buffer.
 class LongBuffer
          A long buffer.
 class MappedByteBuffer
          A direct byte buffer whose content is a memory-mapped region of a file.
 class ShortBuffer
          A short buffer.
 

Uses of Comparable in java.nio.charset
 

Classes in java.nio.charset that implement Comparable
 class Charset
          A named mapping between sequences of sixteen-bit Unicode code units and sequences of bytes.
 

Uses of Comparable in java.security
 

Classes in java.security that implement Comparable
static class KeyRep.Type
          Key type.
 

Uses of Comparable in java.sql
 

Classes in java.sql that implement Comparable
 class ClientInfoStatus
          Enumeration for status of the reason that a property could not be set via a call to Connection.setClientInfo
 class RowIdLifetime
          Enumeration for RowId life-time values.
 class Time
          A thin wrapper around the java.util.Date class that allows the JDBC API to identify this as an SQL TIME value.
 class Timestamp
          A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.
 

Uses of Comparable in java.text
 

Classes in java.text that implement Comparable
 class CollationKey
          A CollationKey represents a String under the rules of a specific Collator object.
static class Normalizer.Form
          This enum provides constants of the four Unicode normalization forms that are described in Unicode Standard Annex #15 — Unicode Normalization Forms and two methods to access them.
 

Uses of Comparable in java.util
 

Classes in java.util that implement Comparable
 class Calendar
          The Calendar class is an abstract class that provides methods for converting between a specific instant in time and a set of calendar fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR, and so on, and for manipulating the calendar fields, such as getting the date of the next week.
 class Date
          The class Date represents a specific instant in time, with millisecond precision.
static class Formatter.BigDecimalLayoutForm
           
 class GregorianCalendar
          GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar system used by most of the world.
 class UUID
          A class that represents an immutable universally unique identifier (UUID).
 

Methods in java.util with type parameters of type Comparable
static
<T extends Object & Comparable<? super T>>
T
Collections.max(Collection<? extends T> coll)
          Returns the maximum element of the given collection, according to the natural ordering of its elements.
static
<T extends Object & Comparable<? super T>>
T
Collections.min(Collection<? extends T> coll)
          Returns the minimum element of the given collection, according to the natural ordering of its elements.
static
<T extends Comparable<? super T>>
void
Collections.sort(List<T> list)
          Sorts the specified list into ascending order, according to the natural ordering of its elements.
 

Method parameters in java.util with type arguments of type Comparable
static
<T> int
Collections.binarySearch(List<? extends Comparable<? super T>> list, T key)
          Searches the specified list for the specified object using the binary search algorithm.
 

Uses of Comparable in java.util.concurrent
 

Subinterfaces of Comparable in java.util.concurrent
 interface Delayed
          A mix-in style interface for marking objects that should be acted upon after a given delay.
 interface RunnableScheduledFuture<V>
          A ScheduledFuture that is Runnable.
 interface ScheduledFuture<V>
          A delayed result-bearing action that can be cancelled.
 

Classes in java.util.concurrent that implement Comparable
 class TimeUnit
          A TimeUnit represents time durations at a given unit of granularity and provides utility methods to convert across units, and to perform timing and delay operations in these units.
 

Uses of Comparable in javax.annotation
 

Classes in javax.annotation that implement Comparable
static class Resource.AuthenticationType
          The two possible authentication types for a resource.
 

Uses of Comparable in javax.imageio.metadata
 

Methods in javax.imageio.metadata with type parameters of type Comparable
protected
<T extends Object & Comparable<? super T>>
void
IIOMetadataFormatImpl.addObjectValue(String elementName, Class<T> classType, T defaultValue, Comparable<? super T> minValue, Comparable<? super T> maxValue, boolean minInclusive, boolean maxInclusive)
          Allows an Object reference of a given class type to be stored in nodes implementing the named element.
 

Methods in javax.imageio.metadata that return Comparable
 Comparable<?> IIOMetadataFormatImpl.getObjectMaxValue(String elementName)
           
 Comparable<?> IIOMetadataFormat.getObjectMaxValue(String elementName)
          Returns the maximum legal value for the Object reference within the named element.
 Comparable<?> IIOMetadataFormatImpl.getObjectMinValue(String elementName)
           
 Comparable<?> IIOMetadataFormat.getObjectMinValue(String elementName)
          Returns the minimum legal value for the Object reference within the named element.
 

Methods in javax.imageio.metadata with parameters of type Comparable
protected
<T extends Object & Comparable<? super T>>
void
IIOMetadataFormatImpl.addObjectValue(String elementName, Class<T> classType, T defaultValue, Comparable<? super T> minValue, Comparable<? super T> maxValue, boolean minInclusive, boolean maxInclusive)
          Allows an Object reference of a given class type to be stored in nodes implementing the named element.
protected
<T extends Object & Comparable<? super T>>
void
IIOMetadataFormatImpl.addObjectValue(String elementName, Class<T> classType, T defaultValue, Comparable<? super T> minValue, Comparable<? super T> maxValue, boolean minInclusive, boolean maxInclusive)
          Allows an Object reference of a given class type to be stored in nodes implementing the named element.
 

Uses of Comparable in javax.jws
 

Classes in javax.jws that implement Comparable
static class WebParam.Mode
          The direction in which the parameter flows
 

Uses of Comparable in javax.jws.soap
 

Classes in javax.jws.soap that implement Comparable
static class SOAPBinding.ParameterStyle
          The style of mapping parameters onto SOAP messages
static class SOAPBinding.Style
          The SOAP binding style
static class SOAPBinding.Use
          The SOAP binding use
 

Uses of Comparable in javax.lang.model
 

Classes in javax.lang.model that implement Comparable
 class SourceVersion
          Source versions of the Java™ programming language.
 

Uses of Comparable in javax.lang.model.element
 

Classes in javax.lang.model.element that implement Comparable
 class ElementKind
          The kind of an element.
 class Modifier
          Represents a modifier on a program element such as a class, method, or field.
 class NestingKind
          The nesting kind of a type element.
 

Uses of Comparable in javax.lang.model.type
 

Classes in javax.lang.model.type that implement Comparable
 class TypeKind
          The kind of a type mirror.
 

Uses of Comparable in javax.management
 

Classes in javax.management that implement Comparable
 class ObjectName
          Represents the object name of an MBean, or a pattern that can match the names of several MBeans.
 

Uses of Comparable in javax.management.openmbean
 

Methods in javax.management.openmbean that return Comparable
 Comparable<?> OpenMBeanParameterInfoSupport.getMaxValue()
          Returns the maximal value for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.
 Comparable<?> OpenMBeanParameterInfo.getMaxValue()
          Returns the maximal value for this parameter, if it has one, or null otherwise.
 Comparable<?> OpenMBeanAttributeInfoSupport.getMaxValue()
          Returns the maximal value for the attribute described by this OpenMBeanAttributeInfoSupport instance, if specified, or null otherwise.
 Comparable<?> OpenMBeanParameterInfoSupport.getMinValue()
          Returns the minimal value for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.
 Comparable<?> OpenMBeanParameterInfo.getMinValue()
          Returns the minimal value for this parameter, if it has one, or null otherwise.
 Comparable<?> OpenMBeanAttributeInfoSupport.getMinValue()
          Returns the minimal value for the attribute described by this OpenMBeanAttributeInfoSupport instance, if specified, or null otherwise.
 

Constructors in javax.management.openmbean with parameters of type Comparable
OpenMBeanAttributeInfoSupport(String name, String description, OpenType<T> openType, boolean isReadable, boolean isWritable, boolean isIs, T defaultValue, Comparable<T> minValue, Comparable<T> maxValue)
          Constructs an OpenMBeanAttributeInfoSupport instance, which describes the attribute of an open MBean, with the specified name, openType, description, defaultValue, minValue and maxValue.
OpenMBeanAttributeInfoSupport(String name, String description, OpenType<T> openType, boolean isReadable, boolean isWritable, boolean isIs, T defaultValue, Comparable<T> minValue, Comparable<T> maxValue)
          Constructs an OpenMBeanAttributeInfoSupport instance, which describes the attribute of an open MBean, with the specified name, openType, description, defaultValue, minValue and maxValue.
OpenMBeanParameterInfoSupport(String name, String description, OpenType<T> openType, T defaultValue, Comparable<T> minValue, Comparable<T> maxValue)
          Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name, openType, description, defaultValue, minValue and maxValue.
OpenMBeanParameterInfoSupport(String name, String description, OpenType<T> openType, T defaultValue, Comparable<T> minValue, Comparable<T> maxValue)
          Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name, openType, description, defaultValue, minValue and maxValue.
 

Uses of Comparable in javax.naming
 

Subinterfaces of Comparable in javax.naming
 interface Name
          The Name interface represents a generic name -- an ordered sequence of components.
 

Classes in javax.naming that implement Comparable
 class CompositeName
          This class represents a composite name -- a sequence of component names spanning multiple namespaces.
 class CompoundName
          This class represents a compound name -- a name from a hierarchical name space.
 

Uses of Comparable in javax.naming.ldap
 

Classes in javax.naming.ldap that implement Comparable
 class LdapName
          This class represents a distinguished name as specified by RFC 2253.
 class Rdn
          This class represents a relative distinguished name, or RDN, which is a component of a distinguished name as specified by RFC 2253.
 

Uses of Comparable in javax.net.ssl
 

Classes in javax.net.ssl that implement Comparable
static class SSLEngineResult.HandshakeStatus
          An SSLEngineResult enum describing the current handshaking state of this SSLEngine.
static class SSLEngineResult.Status
          An SSLEngineResult enum describing the overall result of the SSLEngine operation.
 

Uses of Comparable in javax.swing
 

Classes in javax.swing that implement Comparable
 class DropMode
          Drop modes, used to determine the method by which a component tracks and indicates a drop location during drag and drop.
static class GroupLayout.Alignment
          Enumeration of the possible ways ParallelGroup can align its children.
static class JTable.PrintMode
          Printing modes, used in printing JTables.
static class LayoutStyle.ComponentPlacement
          ComponentPlacement is an enumeration of the possible ways two components can be placed relative to each other.
static class RowFilter.ComparisonType
          Enumeration of the possible comparison values supported by some of the default RowFilters.
 class SortOrder
          SortOrder is an enumeration of the possible sort orderings.
static class SwingWorker.StateValue
          Values for the state bound property.
 

Methods in javax.swing that return Comparable
 Comparable SpinnerDateModel.getEnd()
          Returns the last Date in the sequence.
 Comparable SpinnerNumberModel.getMaximum()
          Returns the last number in the sequence.
 Comparable SpinnerNumberModel.getMinimum()
          Returns the first number in this sequence.
 Comparable SpinnerDateModel.getStart()
          Returns the first Date in the sequence.
 

Methods in javax.swing with parameters of type Comparable
 void SpinnerDateModel.setEnd(Comparable end)
          Changes the upper limit for Dates in this sequence.
 void SpinnerNumberModel.setMaximum(Comparable maximum)
          Changes the upper bound for numbers in this sequence.
 void SpinnerNumberModel.setMinimum(Comparable minimum)
          Changes the lower bound for numbers in this sequence.
 void SpinnerDateModel.setStart(Comparable start)
          Changes the lower limit for Dates in this sequence.
 

Constructors in javax.swing with parameters of type Comparable
SpinnerDateModel(Date value, Comparable start, Comparable end, int calendarField)
          Creates a SpinnerDateModel that represents a sequence of dates between start and end.
SpinnerDateModel(Date value, Comparable start, Comparable end, int calendarField)
          Creates a SpinnerDateModel that represents a sequence of dates between start and end.
SpinnerNumberModel(Number value, Comparable minimum, Comparable maximum, Number stepSize)
          Constructs a SpinnerModel that represents a closed sequence of numbers from minimum to maximum.
SpinnerNumberModel(Number value, Comparable minimum, Comparable maximum, Number stepSize)
          Constructs a SpinnerModel that represents a closed sequence of numbers from minimum to maximum.
 

Uses of Comparable in javax.swing.event
 

Classes in javax.swing.event that implement Comparable
static class RowSorterEvent.Type
          Enumeration of the types of RowSorterEvents.
 

Uses of Comparable in javax.swing.text
 

Methods in javax.swing.text that return Comparable
 Comparable InternationalFormatter.getMaximum()
          Returns the maximum permissible value.
 Comparable InternationalFormatter.getMinimum()
          Returns the minimum permissible value.
 

Methods in javax.swing.text with parameters of type Comparable
 void InternationalFormatter.setMaximum(Comparable max)
          Sets the maximum permissible value.
 void InternationalFormatter.setMinimum(Comparable minimum)
          Sets the minimum permissible value.
 

Uses of Comparable in javax.swing.text.html
 

Classes in javax.swing.text.html that implement Comparable
static class FormSubmitEvent.MethodType
          Represents an HTML form method type.
 

Uses of Comparable in javax.tools
 

Classes in javax.tools that implement Comparable
static class Diagnostic.Kind
          Kinds of diagnostics, for example, error or warning.
static class JavaFileObject.Kind
          Kinds of JavaFileObjects.
 class StandardLocation
          Standard locations of file objects.
 

Uses of Comparable in javax.xml.bind.annotation
 

Classes in javax.xml.bind.annotation that implement Comparable
 class XmlAccessOrder
          Used by XmlAccessorOrder to control the ordering of properties and fields in a JAXB bound class.
 class XmlAccessType
          Used by XmlAccessorType to control serialization of fields or properties.
 class XmlNsForm
          Enumeration of XML Schema namespace qualifications.
 

Uses of Comparable in javax.xml.ws
 

Classes in javax.xml.ws that implement Comparable
static class Service.Mode
          The orientation of a dynamic client or service.
 

Uses of Comparable in javax.xml.ws.handler
 

Classes in javax.xml.ws.handler that implement Comparable
static class MessageContext.Scope
          Property scope.
 


Java™ Platform
Standard Ed. 6

Submit a bug or feature
For further API reference and developer documentation, see Java SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Scripting on this page tracks web page traffic, but does not change the content in any way.