@Immutable public class Filter extends Object implements Comparable<Filter>
The compareTo(Filter) and includes(Filter) methods have the
following relationships:
Filter A, B; A.includes(B) => A.compareTo(B) <= 0 A.includes(B) && B.includes(A) <=> A.compareTo(B) == 0Instances are immutable.
| Modifier and Type | Field and Description |
|---|---|
static Filter |
EVERYTHING
The filter that matches everything.
|
static Filter |
NOTHING
The filter that matches nothing.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Filter that)
If A, B, and C are filters, it's possible to have A.includes(C),
!B.includes(C), and !A.includes(B) and yet A.compareTo(B) < 0 and
B.compareTo(C) < 0.
|
boolean |
equals(Object obj) |
static Filter |
getInstance(String glob)
Returns an instance corresponding to a glob pattern.
|
int |
hashCode() |
protected Object |
readResolve() |
String |
toString() |
public static final Filter EVERYTHING
public static final Filter NOTHING
public static Filter getInstance(String glob)
glob - The the glob pattern or null, in which case
NOTHING is returned.IllegalArgumentException - if glob.length > 1 && glob.charAt(0) ==
ArchivePath.SEPARATOR.NullPointerException - if glob == null.public int compareTo(Filter that)
compareTo in interface Comparable<Filter>protected Object readResolve()
Copyright © 2012 University Corporation for Atmospheric Research. All Rights Reserved.