Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: javax/ide/net/URIFilter.java


1   /*
2    * @(#)URIFilter.java
3    *
4    * Copyright 2003 by Oracle Corporation,
5    * 500 Oracle Parkway, Redwood Shores, California, 94065, U.S.A.
6    * All rights reserved.
7    *
8    * This software is the confidential and proprietary information
9    * of Oracle Corporation.
10   */
11  
12  package javax.ide.net;
13  
14  import java.net.URI;
15  
16  /**
17   *  An instance of <CODE>URIFilter</CODE> can be used to select
18   *  certain URIs out of a set of URIs.
19   */
20  public interface URIFilter
21  {
22    /**
23     *  @param  uri  The {@link URI} that is being filtered.
24     *
25     *  @return  <CODE>true</CODE> if this filter allows the specified
26     *  {@link URI} is allowed to be displayed or included.  Returns
27     *  <CODE>false</CODE> otherwise.
28     *
29     *  @exception  NullPointerException  if the specified {@link URI}
30     *  is <CODE>null</CODE>.
31     */
32    public boolean accept( URI uri );
33  
34    /**
35     *  A concrete <CODE>URIFilter</CODE> must provide an implementation
36     *  for the <CODE>equals()</CODE> method that compares the
37     *  <CODE>URIFilter</CODE> to another one.  A return value of
38     *  <CODE>true</CODE> means that both this <CODE>URIFilter</CODE> and
39     *  the specified <CODE>URIFilter</CODE> will accept identical sets
40     *  of {@link URI}s and that the descriptions used to identify the
41     *  filters are equal.
42     */
43    public boolean equals( Object o );
44  
45    /**
46     *  The implementation of <CODE>toString()</CODE> must return a
47     *  short description that can be shown to the user describing what
48     *  the filter is filter for.  For example: "JPG and GIF images".
49     */
50    public String toString();
51  }