OSDN Git Service

add javadoc for Rational and IfdId in Exif package
authorEarl Ou <shunhsingou@google.com>
Fri, 7 Dec 2012 08:01:09 +0000 (16:01 +0800)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Wed, 19 Dec 2012 13:27:19 +0000 (05:27 -0800)
Change-Id: Ie67dde198337e6edae2e94d5c7e97b9b6063833e

gallerycommon/src/com/android/gallery3d/exif/IfdId.java
gallerycommon/src/com/android/gallery3d/exif/Rational.java

index 1b96343..c05fb02 100644 (file)
  */
 package com.android.gallery3d.exif;
 
+/**
+ * The constants of the IFD ID defined in EXIF spec.
+ */
 public interface IfdId {
     public static final int TYPE_IFD_0 = 0;
     public static final int TYPE_IFD_1 = 1;
     public static final int TYPE_IFD_EXIF = 2;
     public static final int TYPE_IFD_INTEROPERABILITY = 3;
     public static final int TYPE_IFD_GPS = 4;
-    /* This is use in ExifData to allocate enough IfdData */
+    /* This is used in ExifData to allocate enough IfdData */
     static final int TYPE_IFD_COUNT = 5;
 }
index 202c5d4..3f8c18a 100644 (file)
@@ -16,6 +16,9 @@
 
 package com.android.gallery3d.exif;
 
+/**
+ * The rational data type of EXIF tag.
+ */
 public class Rational {
 
     private final long mNominator;
@@ -26,10 +29,16 @@ public class Rational {
         mDenominator = denominator;
     }
 
+    /*
+     * Gets the nominator of the rational.
+     */
     public long getNominator() {
         return mNominator;
     }
 
+    /*
+     * Gets the denominator of the rational
+     */
     public long getDenominator() {
         return mDenominator;
     }
@@ -48,6 +57,9 @@ public class Rational {
         return mNominator + "/" + mDenominator;
     }
 
+    /*
+     * Gets the rational value as type double.
+     */
     public double toDouble() {
         return mNominator / (double) mDenominator;
     }