directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1041316 - /directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java
Date Thu, 02 Dec 2010 09:43:51 GMT
Author: kayyagari
Date: Thu Dec  2 09:43:51 2010
New Revision: 1041316

URL: http://svn.apache.org/viewvc?rev=1041316&view=rev
Log:
o added lessThan and geaterThan methods
o added javadoc

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java?rev=1041316&r1=1041315&r2=1041316&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java
Thu Dec  2 09:43:51 2010
@@ -285,7 +285,11 @@ public class KerberosTime implements Com
     
     
     /**
-     * TODO: Add javadoc
+     * compares current kerberos time with the given kerberos time
+     * @param that the kerberos time against which the current kerberos time is compared
+     * @return 0 if both times are equal,<br>
+     *         -1 if current time is less than the given time and<br>
+     *         1 if the given time is greater than the current time 
      */
     public int compareTo( KerberosTime that )
     {
@@ -312,4 +316,27 @@ public class KerberosTime implements Com
 
         return EQUAL;
     }
+    
+    
+    /**
+     * checks if the current kerberos time is less than the given kerberos time
+     * @param ktime the kerberos time against which the currnet kerberos time needs to be
compared
+     * @return true if current kerberos time is less than the given kerberos time, false
otherwise
+     */
+    public boolean lessThan( KerberosTime ktime )
+    {
+        return kerberosTime < ktime.kerberosTime;
+    }
+    
+    
+    /**
+     * checks if the current kerberos time is greater than the given kerberos time
+     * @param ktime the kerberos time against which the currnet kerberos time needs to be
compared
+     * @return true if current kerberos time is greater than the given kerberos time, false
otherwise
+     */
+    public boolean greaterThan( KerberosTime ktime )
+    {
+        return kerberosTime > ktime.kerberosTime;
+    }
+
 }



Mime
View raw message