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.</p> * * <p>"/" will be used as the directory separator.</p> + * @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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]