From dev-return-62740-apmail-ant-dev-archive=ant.apache.org@ant.apache.org Fri Jan 07 15:00:50 2005 Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 32179 invoked from network); 7 Jan 2005 15:00:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 7 Jan 2005 15:00:50 -0000 Received: (qmail 51872 invoked by uid 500); 7 Jan 2005 15:00:48 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 51806 invoked by uid 500); 7 Jan 2005 15:00:48 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 51777 invoked by uid 500); 7 Jan 2005 15:00:47 -0000 Received: (qmail 51761 invoked by uid 99); 7 Jan 2005 15:00:47 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Fri, 07 Jan 2005 07:00:47 -0800 Received: (qmail 32159 invoked by uid 1539); 7 Jan 2005 15:00:46 -0000 Date: 7 Jan 2005 15:00:46 -0000 Message-ID: <20050107150046.32158.qmail@minotaur.apache.org> From: peterreilly@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/src/main/org/apache/tools/ant/types Resource.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N peterreilly 2005/01/07 07:00:46 Modified: src/main/org/apache/tools/ant/types Resource.java Log: javadoc Revision Changes Path 1.10 +25 -3 ant/src/main/org/apache/tools/ant/types/Resource.java Index: Resource.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Resource.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Resource.java 9 Mar 2004 16:48:41 -0000 1.9 +++ Resource.java 7 Jan 2005 15:00:46 -0000 1.10 @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 The Apache Software Foundation + * Copyright 2003-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,6 +54,8 @@ * * @param name relative path of the resource. Expects * "/" to be used as the directory separator. + * @param exists if true, this resource exists + * @param lastmodified the last modification time of this resource */ public Resource(String name, boolean exists, long lastmodified) { this(name, exists, lastmodified, false); @@ -62,6 +64,9 @@ /** * @param name relative path of the resource. Expects * "/" to be used as the directory separator. + * @param exists if true the resource exists + * @param lastmodified the last modification time of the resource + * @param directory if true, this resource is a directory */ public Resource(String name, boolean exists, long lastmodified, boolean directory) { @@ -81,6 +86,7 @@ * adm/resource.txt.

* *

"/" will be used as the directory separator.

+ * @return the name of this resource */ public String getName() { return name; @@ -93,13 +99,19 @@ public void setName(String name) { this.name = name; } + /** - * the exists attribute tells whether a file exists + * The exists attribute tells whether a file exists + * @return true if this resource exists */ public boolean isExists() { return exists; } + /** + * Set the exists attribute. + * @param exists if true, this resource exists + */ public void setExists(boolean exists) { this.exists = exists; } @@ -114,9 +126,14 @@ return !exists || lastmodified < 0 ? 0 : lastmodified; } + /** + * Set the last modification attribute. + * @param lastmodified the modification time in milliseconds since 01.01.1970 + */ public void setLastModified(long lastmodified) { this.lastmodified = lastmodified; } + /** * tells if the resource is a directory * @return boolean flag indicating if the resource is a directory @@ -125,6 +142,10 @@ return directory; } + /** + * Set the directory attribute. + * @param directory if true, this resource is a directory + */ public void setDirectory(boolean directory) { this.directory = directory; } @@ -143,7 +164,8 @@ /** * delegates to a comparison of names. - * + * @param other the object to compare to + * @return true if this object's name is the same as the other object's name * @since Ant 1.6 */ public int compareTo(Object other) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org