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

E17493-02

oracle.ide.file
Class Path

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<FileSet>
              extended by oracle.ide.file.Path
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<FileSet>, java.util.Collection<FileSet>, java.util.List<FileSet>, java.util.RandomAccess

@NotThreadSafe
public final class Path
extends java.util.ArrayList<FileSet>

An ordered path made up of FileSet. Duplicate file sets and null file set are not allowed in the path.

Since:
11.1.2
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Method Summary
 boolean add(FileSet fileSet)
           
 void add(int index, FileSet element)
           
 boolean addAll(java.util.Collection<? extends FileSet> c)
           
 boolean addAll(int index, java.util.Collection<? extends FileSet> c)
           
 void clear()
           
 boolean contains(java.lang.Object o)
           
 boolean contains(java.net.URL url)
          Determine whether this path contains a URL.
 boolean containsAll(java.util.Collection<?> c)
           
static Path getInstance()
          Get an empty path.
static Path getInstance(java.util.Collection<FileSet> fileSets)
          Get a path instance containing the given file sets.
static Path getInstance(FileSet... fileSets)
          Get a path instance containing the given file sets.
static Path getInstance(int capacity)
          Get an empty path with the given initial capacity.
static Path getInstance(URLPath urlPath)
          Get a path instance containing the locations in a URLPath.
 FileSet remove(int index)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> c)
           
 boolean retainAll(java.util.Collection<?> c)
           
 FileSet set(int index, FileSet element)
           
 java.lang.String toRelativePath(java.net.URL url)
          Get the path of a URL, relative to this path.
 
Methods inherited from class java.util.ArrayList
clone, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, removeRange, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode, iterator, listIterator, listIterator, subList
 

Method Detail

getInstance

public static Path getInstance()
Get an empty path.

Returns:
an empty path

getInstance

public static Path getInstance(int capacity)
Get an empty path with the given initial capacity.

Parameters:
capacity - the initial capacity
Returns:
the empty path

getInstance

public static Path getInstance(FileSet... fileSets)
Get a path instance containing the given file sets.

Parameters:
fileSets - the file sets
Returns:
the path instance
Throws:
NullArgumentException - if any of the file sets are null

getInstance

public static Path getInstance(URLPath urlPath)
Get a path instance containing the locations in a URLPath. This is useful for converting legacy URLPath instances to Path instances.

Parameters:
urlPath - the URL path
Returns:
the path instance

getInstance

public static Path getInstance(java.util.Collection<FileSet> fileSets)
Get a path instance containing the given file sets.

Parameters:
fileSets - the file sets
Returns:
the path instance
Throws:
NullArgumentException - if the collection or any file set in the collection is null

contains

public boolean contains(java.net.URL url)
Determine whether this path contains a URL. Note that this only takes into account the file set filters. 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 path contains the given URL, false otherwise

toRelativePath

public java.lang.String toRelativePath(java.net.URL url)
Get the path of a URL, relative to this path. Returns null if the URL is not in this path. 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 path

add

public boolean add(FileSet fileSet)
Specified by:
add in interface java.util.Collection<FileSet>
Specified by:
add in interface java.util.List<FileSet>
Overrides:
add in class java.util.ArrayList<FileSet>

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<FileSet>
Specified by:
remove in interface java.util.List<FileSet>
Overrides:
remove in class java.util.ArrayList<FileSet>

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection<FileSet>
Specified by:
contains in interface java.util.List<FileSet>
Overrides:
contains in class java.util.ArrayList<FileSet>

containsAll

public boolean containsAll(java.util.Collection<?> c)
Specified by:
containsAll in interface java.util.Collection<FileSet>
Specified by:
containsAll in interface java.util.List<FileSet>
Overrides:
containsAll in class java.util.AbstractCollection<FileSet>

addAll

public boolean addAll(java.util.Collection<? extends FileSet> c)
Specified by:
addAll in interface java.util.Collection<FileSet>
Specified by:
addAll in interface java.util.List<FileSet>
Overrides:
addAll in class java.util.ArrayList<FileSet>

removeAll

public boolean removeAll(java.util.Collection<?> c)
Specified by:
removeAll in interface java.util.Collection<FileSet>
Specified by:
removeAll in interface java.util.List<FileSet>
Overrides:
removeAll in class java.util.AbstractCollection<FileSet>

retainAll

public boolean retainAll(java.util.Collection<?> c)
Specified by:
retainAll in interface java.util.Collection<FileSet>
Specified by:
retainAll in interface java.util.List<FileSet>
Overrides:
retainAll in class java.util.AbstractCollection<FileSet>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<FileSet>
Specified by:
clear in interface java.util.List<FileSet>
Overrides:
clear in class java.util.ArrayList<FileSet>

add

public void add(int index,
                FileSet element)
Specified by:
add in interface java.util.List<FileSet>
Overrides:
add in class java.util.ArrayList<FileSet>

remove

public FileSet remove(int index)
Specified by:
remove in interface java.util.List<FileSet>
Overrides:
remove in class java.util.ArrayList<FileSet>

addAll

public boolean addAll(int index,
                      java.util.Collection<? extends FileSet> c)
Specified by:
addAll in interface java.util.List<FileSet>
Overrides:
addAll in class java.util.ArrayList<FileSet>

set

public FileSet set(int index,
                   FileSet element)
Specified by:
set in interface java.util.List<FileSet>
Overrides:
set in class java.util.ArrayList<FileSet>

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

E17493-02

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