From 7c6eb95a14d5467c8396524645a1b2d9273a7300 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Mon, 23 Oct 2006 18:14:09 +0000 Subject: Examples make consistent use of get/set pair. --- .../java/com/amazon/carbonado/constraint/ConstraintDefinition.java | 1 + src/main/java/com/amazon/carbonado/constraint/FloatConstraint.java | 1 - src/main/java/com/amazon/carbonado/constraint/IntegerConstraint.java | 2 -- src/main/java/com/amazon/carbonado/constraint/LengthConstraint.java | 3 +-- src/main/java/com/amazon/carbonado/constraint/TextConstraint.java | 1 - 5 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/constraint') diff --git a/src/main/java/com/amazon/carbonado/constraint/ConstraintDefinition.java b/src/main/java/com/amazon/carbonado/constraint/ConstraintDefinition.java index 22514fc..73db4ef 100644 --- a/src/main/java/com/amazon/carbonado/constraint/ConstraintDefinition.java +++ b/src/main/java/com/amazon/carbonado/constraint/ConstraintDefinition.java @@ -83,6 +83,7 @@ import java.lang.annotation.*; * public interface UserInfo extends Storable { * ... * + * int getAge(); * // Constraint is called before setting age. * @IntegerConstraint(min=0, max=120) * void setAge(int value); diff --git a/src/main/java/com/amazon/carbonado/constraint/FloatConstraint.java b/src/main/java/com/amazon/carbonado/constraint/FloatConstraint.java index 31b6503..29c5c83 100644 --- a/src/main/java/com/amazon/carbonado/constraint/FloatConstraint.java +++ b/src/main/java/com/amazon/carbonado/constraint/FloatConstraint.java @@ -32,7 +32,6 @@ import com.amazon.carbonado.MalformedTypeException; *

Example:

  * public interface PolarCoordinate extends Storable {
  *     double getTheta();
- *
  *     @FloatConstraint(min=0, max=Math.PI * 2, disallowed=Double.NaN)
  *     void setTheta(double radians);
  *
diff --git a/src/main/java/com/amazon/carbonado/constraint/IntegerConstraint.java b/src/main/java/com/amazon/carbonado/constraint/IntegerConstraint.java
index 69fa5cc..56171fd 100644
--- a/src/main/java/com/amazon/carbonado/constraint/IntegerConstraint.java
+++ b/src/main/java/com/amazon/carbonado/constraint/IntegerConstraint.java
@@ -32,12 +32,10 @@ import com.amazon.carbonado.MalformedTypeException;
  * 

Example:

  * public interface UserInfo extends Storable {
  *     int getAge();
- *
  *     @IntegerConstraint(min=0, max=120)
  *     void setAge(int value);
  *
  *     int getRoleID();
- *
  *     @IntegerConstraint(allowed={ROLE_REGULAR, ROLE_ADMIN})
  *     void setRoleID(int role);
  *
diff --git a/src/main/java/com/amazon/carbonado/constraint/LengthConstraint.java b/src/main/java/com/amazon/carbonado/constraint/LengthConstraint.java
index 7e17a1f..1ffb4b5 100644
--- a/src/main/java/com/amazon/carbonado/constraint/LengthConstraint.java
+++ b/src/main/java/com/amazon/carbonado/constraint/LengthConstraint.java
@@ -30,8 +30,7 @@ import com.amazon.carbonado.MalformedTypeException;
  *
  * 

Example:

  * public interface UserInfo extends Storable {
- *     int getFirstName();
- *
+ *     String getFirstName();
  *     @LengthConstraint(min=1, max=50)
  *     void setFirstName(String name);
  *
diff --git a/src/main/java/com/amazon/carbonado/constraint/TextConstraint.java b/src/main/java/com/amazon/carbonado/constraint/TextConstraint.java
index 08574e8..a9e90db 100644
--- a/src/main/java/com/amazon/carbonado/constraint/TextConstraint.java
+++ b/src/main/java/com/amazon/carbonado/constraint/TextConstraint.java
@@ -32,7 +32,6 @@ import com.amazon.carbonado.MalformedTypeException;
  * 

Example:

  * public interface UserInfo extends Storable {
  *     char isActive();
- *
  *     @TextConstraint(allowed={"Y", "N"})
  *     void setActive(char value);
  *
-- 
cgit v1.2.3