Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.jdeveloper.deploy
Class ArchiveEntry

java.lang.Object
  extended by oracle.jdeveloper.deploy.ArchiveEntry
All Implemented Interfaces:
java.lang.Comparable

public class ArchiveEntry
extends java.lang.Object
implements java.lang.Comparable

This class represents an immutable entry in an Archive. The primary consumer of the data encapsulated by this class is the Archive class. Archive interprets instances of ArchiveEntry as archiving instructions -- the content at the specified ArchiveEntry.url is archived into the zip/jar file as ArchiveEntry.entryName.


Field Summary
protected  java.lang.String entryName
           
protected  java.net.URL url
           
 
Constructor Summary
ArchiveEntry(java.lang.String entryName, java.net.URL url)
          Create an immutable ArchiveEntry for use in an Archive.
 
Method Summary
 int compareTo(java.lang.Object o)
          Only the entry name is used in the comparison.
 boolean equals(java.lang.Object o)
          For hashing purposes, two instances of ArchiveEntry are equal if their entry names are equal.
 java.lang.String getName()
          Get the name for the Archive entry.
 java.net.URL getURL()
          Get the URL for the entry.
 int hashCode()
          Only the entry name is used for hashing; the URL is ignored.
 java.lang.String toString()
          This simply returns the entryName.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

entryName

protected final java.lang.String entryName

url

protected final java.net.URL url
Constructor Detail

ArchiveEntry

public ArchiveEntry(java.lang.String entryName,
                    java.net.URL url)
Create an immutable ArchiveEntry for use in an Archive.

Parameters:
entryName - The entry name of the file as it should appear in the zip/jar file. Note that forward slashes ("/") should be used as the file separator character within the entry name.
url - The URL of the content being represented by this ArchiveEntry. This can be null if the content URL could not be located.
Method Detail

getName

public java.lang.String getName()
Get the name for the Archive entry.


getURL

public java.net.URL getURL()
Get the URL for the entry.


hashCode

public int hashCode()
Only the entry name is used for hashing; the URL is ignored.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
For hashing purposes, two instances of ArchiveEntry are equal if their entry names are equal. Note that this does not necessarily mean that they point to identical content, since the URLs do not affect the value returned by equals(). The reason for this implementation of equals() is that multiple ArchiveEntry instances added to the same java.util.Set will replace each other if their entry name is the same.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
This simply returns the entryName. This makes it very convenient to use ArchiveEntry in a variety of UI widgets that provide a default presentation based on the toString() method.

Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object o)
Only the entry name is used in the comparison. This is consistent with the implementation of equals().

Specified by:
compareTo in interface java.lang.Comparable

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

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