java.awt.datatransfer
Class DataFlavor.TextFlavorComparator
java.lang.Object
sun.awt.datatransfer.DataTransferer.IndexedComparator
sun.awt.datatransfer.DataTransferer.DataFlavorComparator
java.awt.datatransfer.DataFlavor.TextFlavorComparator
- All Implemented Interfaces:
- Comparator
- Enclosing class:
- DataFlavor
- static class DataFlavor.TextFlavorComparator
- extends sun.awt.datatransfer.DataTransferer.DataFlavorComparator
Fields inherited from class sun.awt.datatransfer.DataTransferer.DataFlavorComparator |
flavorToFormatMap |
Fields inherited from class sun.awt.datatransfer.DataTransferer.IndexedComparator |
order, SELECT_BEST, SELECT_WORST |
Methods inherited from class sun.awt.datatransfer.DataTransferer.DataFlavorComparator |
|
Methods inherited from class sun.awt.datatransfer.DataTransferer.IndexedComparator |
compareIndices, compareLongs |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataFlavor.TextFlavorComparator
DataFlavor.TextFlavorComparator()
compare
public int compare(Object obj1,
Object obj2)
- Compares two
DataFlavor
objects. Returns a negative
integer, zero, or a positive integer as the first
DataFlavor
is worse than, equal to, or better than the
second.
DataFlavor
s are ordered according to the rules outlined
for selectBestTextFlavor
.
- Parameters:
obj1
- the first DataFlavor
to be comparedobj2
- the second DataFlavor
to be compared
- Returns:
- a negative integer, zero, or a positive integer as the first
argument is worse, equal to, or better than the second
- Throws:
ClassCastException
- if either of the arguments is not an
instance of DataFlavor
NullPointerException
- if either of the arguments is
null
- See Also:
DataFlavor.selectBestTextFlavor(java.awt.datatransfer.DataFlavor[])