public class AcceptAllFileFilter
extends javax.swing.filechooser.FileFilter
implements java.lang.Comparable
| Constructor and Description |
|---|
AcceptAllFileFilter(java.lang.String description)
Creates a new instance of AcceptAllFileFilter.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(java.io.File f)
Whether the given file is accepted by this filter.
|
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order.
|
boolean |
equals(java.lang.Object o)
Returns true when the given object is of the same type
and its description is equal.
|
java.lang.String |
getDescription()
The description of this filter.
|
int |
hashCode()
Returns a hash code derived from the description of
this file filter.
|
public AcceptAllFileFilter(java.lang.String description)
description - The description of the filter.public boolean accept(java.io.File f)
accept in class javax.swing.filechooser.FileFilterpublic java.lang.String getDescription()
getDescription in class javax.swing.filechooser.FileFilterFileView.getName(java.io.File)public int compareTo(java.lang.Object o)
The implementor must ensure sgn(x.compareTo(y)) == -sgn(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception iff y.compareTo(x) throws an exception.)
The implementor must also ensure that the relation is transitive: (x.compareTo(y)>0 && y.compareTo(z)>0) implies x.compareTo(z)>0.
Finally, the implementer must ensure that x.compareTo(y)==0 implies that sgn(x.compareTo(z)) == sgn(y.compareTo(z)), for all z.
It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any class that implements the Comparable interface and violates this condition should clearly indicate this fact. The recommended language is "Note: this class has a natural ordering that is inconsistent with equals."
compareTo in interface java.lang.Comparableo - the Object to be compared.java.lang.ClassCastException - if the specified object's type prevents it
from being compared to this Object.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object