From 223eb81714f659731022ed45cc308512751b95a3 Mon Sep 17 00:00:00 2001
From: Peter Reilly
Date: Fri, 7 Jan 2005 15:00:46 +0000
Subject: [PATCH] javadoc
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277314 13f79535-47bb-0310-9956-ffa450edef68
---
.../org/apache/tools/ant/types/Resource.java | 28 +++++++++++++++++--
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/src/main/org/apache/tools/ant/types/Resource.java b/src/main/org/apache/tools/ant/types/Resource.java
index c3186b60f..47d2e952f 100644
--- a/src/main/org/apache/tools/ant/types/Resource.java
+++ b/src/main/org/apache/tools/ant/types/Resource.java
@@ -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 @@ public class Resource implements Cloneable, Comparable {
*
* @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 @@ public class Resource implements Cloneable, Comparable {
/**
* @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 @@ public class Resource implements Cloneable, Comparable {
* 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 class Resource implements Cloneable, Comparable {
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 @@ public class Resource implements Cloneable, Comparable {
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 @@ public class Resource implements Cloneable, Comparable {
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 @@ public class Resource implements Cloneable, Comparable {
/**
* 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) {