From 59185851eda16b725d47a56ec71d954944522400 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Sat, 19 Apr 2008 21:28:19 +0000 Subject: Use Javadoc literals. --- .../java/com/amazon/carbonado/Independent.java | 19 ++++++++++--------- src/main/java/com/amazon/carbonado/Storable.java | 22 +++++++++++----------- .../cursor/SymmetricDifferenceCursor.java | 6 +++--- .../carbonado/info/ConversionComparator.java | 4 ++-- .../com/amazon/carbonado/info/StorableIndex.java | 6 ++++-- .../java/com/amazon/carbonado/raw/RawCursor.java | 4 ++-- 6 files changed, 32 insertions(+), 29 deletions(-) (limited to 'src/main/java/com/amazon/carbonado') diff --git a/src/main/java/com/amazon/carbonado/Independent.java b/src/main/java/com/amazon/carbonado/Independent.java index ab4b50b..92024e1 100644 --- a/src/main/java/com/amazon/carbonado/Independent.java +++ b/src/main/java/com/amazon/carbonado/Independent.java @@ -28,18 +28,19 @@ import java.lang.annotation.*; * makes the property or type unsupported. Any subsequent invocation of a property access * method for the independent type or property will cause an UnsupportedOperationException * to be thrown. - *

- * One example of when this might be used would be to store a calculated field in the cached - * representation of the object. It is not necessary to prevent implemented methods - * of the form "get<value>" from being inadvertently interpreted as properties of the - * storable; any implementation is by definition not a property. - *

- * If a correctly matching property actually is found, then this annotation is - * ignored and the property or type is defined as usual. If the Repository + * + *

One example of when this might be used would be to store a calculated + * field in the cached representation of the object. It is not + * necessary to prevent implemented methods of the form {@literal "get"} + * from being inadvertently interpreted as properties of the storable; any + * implementation is by definition not a property. + * + *

If a correctly matching property actually is found, then this annotation + * is ignored and the property or type is defined as usual. If the Repository * finds a property whose name matches, but whose type does not match, a * MismatchException will be thrown regardless of this annotation. * - *

Independent repositories completely ignore this annotation. + *

Independent repositories completely ignore this annotation. * *

Example:

  * public interface UserInfo extends Storable<UserInfo> {
diff --git a/src/main/java/com/amazon/carbonado/Storable.java b/src/main/java/com/amazon/carbonado/Storable.java
index 5500f56..e333f15 100644
--- a/src/main/java/com/amazon/carbonado/Storable.java
+++ b/src/main/java/com/amazon/carbonado/Storable.java
@@ -259,12 +259,12 @@ public interface Storable> {
 
     /**
      * Copies all supported properties, skipping any that are uninitialized.
-     * Specifically, calls "target.set<property>" for all supported
+     * Specifically, calls {@literal "target.set"} for all supported
      * properties in this storable, passing the value of the property from this
      * object. Unsupported {@link Independent independent} properties in this
      * or the target are not copied.
      *
-     * @param target storable on which to call set<property> methods
+     * @param target storable on which to call {@literal set} methods
      * @throws IllegalStateException if any primary key properties of target
      * cannot be altered
      */
@@ -272,12 +272,12 @@ public interface Storable> {
 
     /**
      * Copies all supported primary key properties, skipping any that are
-     * uninitialized. Specifically, calls "target.set<property>" for all
+     * uninitialized. Specifically, calls {@literal "target.set"} for all
      * supported properties which participate in the primary key, passing the
      * value of the property from this object. Unsupported {@link Independent
      * independent} properties in this or the target are not copied.
      *
-     * @param target storable on which to call set<property> methods
+     * @param target storable on which to call {@literal set} methods
      * @throws IllegalStateException if any primary key properties of target
      * cannot be altered
      */
@@ -285,38 +285,38 @@ public interface Storable> {
 
     /**
      * Copies the optional version property, unless it is uninitialized.
-     * Specifically, calls "target.set<property>" for the version
+     * Specifically, calls {@literal "target.set"} for the version
      * property (if supported), passing the value of the property from this
      * object. If no version property is defined, then this method does
      * nothing. Unsupported {@link Independent independent} properties in this
      * or the target are not copied.
      *
-     * @param target storable on which to call set<property> method
+     * @param target storable on which to call {@literal set} method
      */
     void copyVersionProperty(S target);
 
     /**
      * Copies all supported non-primary key properties which are unequal,
      * skipping any that are uninitialized. Specifically, calls
-     * "target.get<property>", and if the value thus retrieved differs
-     * from the local value, "target.set<property>" is called for that
+     * {@literal "target.get"}, and if the value thus retrieved differs
+     * from the local value, {@literal "target.set"} is called for that
      * property. Unsupported {@link Independent independent} properties in this
      * or the target are not copied.
      *
-     * @param target storable on which to call set<property> methods
+     * @param target storable on which to call {@literal set} methods
      */
     void copyUnequalProperties(S target);
 
     /**
      * Copies all supported non-primary key properties which are
-     * dirty. Specifically, calls "target.set<property>" for any
+     * dirty. Specifically, calls {@literal "target.set"} for any
      * non-primary key property which is dirty, passing the value of the
      * property from this object. A property is considered dirty when set
      * before a load or persist operation is called. Unsupported {@link
      * Independent independent} properties in this or the target are not
      * copied.
      *
-     * @param target storable on which to call set<property> methods
+     * @param target storable on which to call {@literal set} methods
      */
     void copyDirtyProperties(S target);
 
diff --git a/src/main/java/com/amazon/carbonado/cursor/SymmetricDifferenceCursor.java b/src/main/java/com/amazon/carbonado/cursor/SymmetricDifferenceCursor.java
index 1cd381a..b78cf79 100644
--- a/src/main/java/com/amazon/carbonado/cursor/SymmetricDifferenceCursor.java
+++ b/src/main/java/com/amazon/carbonado/cursor/SymmetricDifferenceCursor.java
@@ -81,9 +81,9 @@ public class SymmetricDifferenceCursor extends AbstractCursor {
     }
 
     /**
-     * Returns 0 if no next element available, <0 if next element is from
-     * left source cursor, and >0 if next element is from right source
-     * cursor.
+     * Returns 0 if no next element available, {@literal <0} if next element is
+     * from left source cursor, and {@literal >0} if next element is from right
+     * source cursor.
      */
     public int compareNext() throws FetchException {
         if (mCompareResult != 0) {
diff --git a/src/main/java/com/amazon/carbonado/info/ConversionComparator.java b/src/main/java/com/amazon/carbonado/info/ConversionComparator.java
index 6582d27..0feac47 100644
--- a/src/main/java/com/amazon/carbonado/info/ConversionComparator.java
+++ b/src/main/java/com/amazon/carbonado/info/ConversionComparator.java
@@ -84,8 +84,8 @@ class ConversionComparator implements Comparator {
 
     /**
      * Evaluates two types, to see which one is nearest to the from type.
-     * Return <0 if "a" is nearest, 0 if both are equally good, >0 if "b" is
-     * nearest.
+     * Return {@literal <0} if "a" is nearest, 0 if both are equally good,
+     * {@literal >0} if "b" is nearest.
      */
     public int compare(Class toType_a, Class toType_b) {
         TypeDesc from = mFrom;
diff --git a/src/main/java/com/amazon/carbonado/info/StorableIndex.java b/src/main/java/com/amazon/carbonado/info/StorableIndex.java
index 49697c0..9806c61 100644
--- a/src/main/java/com/amazon/carbonado/info/StorableIndex.java
+++ b/src/main/java/com/amazon/carbonado/info/StorableIndex.java
@@ -543,8 +543,10 @@ public class StorableIndex implements Appender {
     /**
      * Converts this index into a parseable name descriptor string, whose
      * general format is:
-     * 
<storable type>~<attr><+|-|~><property><+|-|~><property>...
- * Attr is "U" for a unique index, "N" for a non-unique index. + * + *

{@code ~<+|-|~><+|-|~>...} + * + *

Attr is "U" for a unique index, "N" for a non-unique index. * *

Example: {@code my.pkg.UserInfo~N+lastName+firstName-birthDate} * diff --git a/src/main/java/com/amazon/carbonado/raw/RawCursor.java b/src/main/java/com/amazon/carbonado/raw/RawCursor.java index 7962c45..2c7aa1d 100644 --- a/src/main/java/com/amazon/carbonado/raw/RawCursor.java +++ b/src/main/java/com/amazon/carbonado/raw/RawCursor.java @@ -495,8 +495,8 @@ public abstract class RawCursor extends AbstractCursor { } /** - * Returns <0 if key1 is less, 0 if equal (at least partially), >0 - * if key1 is greater. + * Returns {@literal <0} if key1 is less, 0 if equal (at least partially), + * {@literal >0} if key1 is greater. */ protected int compareKeysPartially(byte[] key1, byte[] key2) { int length = Math.min(key1.length, key2.length); -- cgit v1.2.3