diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2006-10-23 18:14:09 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2006-10-23 18:14:09 +0000 |
commit | 7c6eb95a14d5467c8396524645a1b2d9273a7300 (patch) | |
tree | 80f7e7f372c1979c2bd10c2ee6031bc1b99acf54 /src/main/java/com/amazon/carbonado/constraint | |
parent | 1faf119a884e3dd2388aea39fed3f4eb3699999a (diff) |
Examples make consistent use of get/set pair.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/constraint')
5 files changed, 2 insertions, 6 deletions
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.
* <b>@IntegerConstraint(min=0, max=120)</b>
* 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; * <p>Example:<pre>
* public interface PolarCoordinate extends Storable {
* double getTheta();
- *
* <b>@FloatConstraint(min=0, max=Math.PI * 2, disallowed=Double.NaN)</b>
* 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; * <p>Example:<pre>
* public interface UserInfo extends Storable {
* int getAge();
- *
* <b>@IntegerConstraint(min=0, max=120)</b>
* void setAge(int value);
*
* int getRoleID();
- *
* <b>@IntegerConstraint(allowed={ROLE_REGULAR, ROLE_ADMIN})</b>
* 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; *
* <p>Example:<pre>
* public interface UserInfo extends Storable {
- * int getFirstName();
- *
+ * String getFirstName();
* <b>@LengthConstraint(min=1, max=50)</b>
* 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; * <p>Example:<pre>
* public interface UserInfo extends Storable {
* char isActive();
- *
* <b>@TextConstraint(allowed={"Y", "N"})</b>
* void setActive(char value);
*
|