Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.ide.file
Class FileSet

java.lang.Object
  extended by oracle.ide.file.FileSet


public class FileSet
extends java.lang.Object

A set of files selected from a single root directory.

Since:
11.1.2

Constructor Summary
protected FileSet(java.net.URL root, FileSetFilter filter)
           

 

Method Summary
 boolean contains(java.net.URL url)
          Determine whether this file set contains a URL.
 boolean equals(java.lang.Object o)
           
 FileSetFilter getFilter()
          Get the filter of this file set.
static FileSet getInstance(java.net.URL root)
          Get a file set instance that contains all files in a root directory.
static FileSet getInstance(java.net.URL root, FileSetFilter filter)
          Get a file set instance that contains all file in a root directory that are accepted by a filter.
 java.lang.String getRelativePath(java.net.URL url)
          Get the path of a URL, relative to this file set.
 java.net.URL getRoot()
          Get the root directory of this file set.
 int hashCode()
           
 FileSet intern()
          Returns a canonical representation of the file set.
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

FileSet

protected FileSet(java.net.URL root,
                  FileSetFilter filter)

Method Detail

getInstance

public static FileSet getInstance(@NotNull
                                  java.net.URL root)
Get a file set instance that contains all files in a root directory.
Parameters:
root - the root directory
Returns:
the file set instance

getInstance

public static FileSet getInstance(@NotNull
                                  java.net.URL root,
                                  @NotNull
                                  FileSetFilter filter)
Get a file set instance that contains all file in a root directory that are accepted by a filter.
Parameters:
root - the root directory
filter - the filter
Returns:
the file set instance

getRoot

public java.net.URL getRoot()
Get the root directory of this file set.
Returns:
the root directory

getFilter

public FileSetFilter getFilter()
Get the filter of this file set.
Returns:
the filter

intern

public FileSet intern()
Returns a canonical representation of the file set. This is useful when the instance needs to be stored in memory, as it prevents more than one instance of any FileSet from being pinned on the heap. It also allows instances to be compared using ==. Interned keys can also be used as keys in an IdentityHashMap.
Returns:
the interned instance

contains

public boolean contains(java.net.URL url)
Determine whether this file set contains a URL. Note that this only takes into account the filters of this file set. It does not apply the GlobalIgnoreList filters or any other filters. This does not check for existence of the URL.
Parameters:
url - the URL
Returns:
true if this root contains the given URL, false otherwise

getRelativePath

public java.lang.String getRelativePath(java.net.URL url)
Get the path of a URL, relative to this file set. Returns null if the URL is not in this file set. This does not check whether the URL or relative path exists.
Parameters:
url - the URL
Returns:
the relative path of the URL, or null if the URL is not in this file set

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.