Update of /var/cvs/src/org/mmbase/datatypes
In directory james.mmbase.org:/tmp/cvs-serv7178

Modified Files:
        BinaryDataType.java BooleanDataType.java 
        ComparableDataType.java LengthDataType.java LongDataType.java 
        NumberDataType.java 
Log Message:
spacing, details, javadoc


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/datatypes


Index: BinaryDataType.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/BinaryDataType.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- BinaryDataType.java 16 Sep 2007 17:55:28 -0000      1.14
+++ BinaryDataType.java 1 Sep 2008 17:39:44 -0000       1.15
@@ -17,16 +17,17 @@
  * The datatype associated with byte arrays ('blobs').
  *
  * @author Pierre van Rooden
- * @version $Id: BinaryDataType.java,v 1.14 2007/09/16 17:55:28 michiel Exp $
+ * @version $Id: BinaryDataType.java,v 1.15 2008/09/01 17:39:44 michiel Exp $
  * @since MMBase-1.8
  */
 public class BinaryDataType extends AbstractLengthDataType<byte[]> {
 
     private static final Logger log = 
Logging.getLoggerInstance(BinaryDataType.class);
 
-    private static final long serialVersionUID = 1L; // increase this if 
object serialization changes (which we shouldn't do!)
+    private static final long serialVersionUID = 1L; 
 
     protected Pattern validMimeTypes = Pattern.compile(".*");
+
     /**
      * Constructor for binary field.
      * @param name the name of the data type


Index: BooleanDataType.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/BooleanDataType.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- BooleanDataType.java        28 Aug 2007 10:06:05 -0000      1.13
+++ BooleanDataType.java        1 Sep 2008 17:39:44 -0000       1.14
@@ -13,12 +13,12 @@
  * The DataType associated with a boolean value.
  *
  * @author Pierre van Rooden
- * @version $Id: BooleanDataType.java,v 1.13 2007/08/28 10:06:05 michiel Exp $
+ * @version $Id: BooleanDataType.java,v 1.14 2008/09/01 17:39:44 michiel Exp $
  * @since MMBase-1.8
  */
 public class BooleanDataType extends BasicDataType<Boolean> {
 
-    private static final long serialVersionUID = 1L; // increase this if 
object serialization changes (which we shouldn't do!)
+    private static final long serialVersionUID = 1L; 
 
     /**
      * Constructor for a boolean datatype (either a primitive boolean type or 
the Boolean class).


Index: ComparableDataType.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/ComparableDataType.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- ComparableDataType.java     27 Aug 2008 17:09:16 -0000      1.38
+++ ComparableDataType.java     1 Sep 2008 17:39:44 -0000       1.39
@@ -21,10 +21,10 @@
  * therefore can have a minimum and a maximum value.
  *
  * @author Michiel Meeuwissen
- * @version $Id: ComparableDataType.java,v 1.38 2008/08/27 17:09:16 michiel 
Exp $
+ * @version $Id: ComparableDataType.java,v 1.39 2008/09/01 17:39:44 michiel 
Exp $
  * @since MMBase-1.8
  */
-public abstract class ComparableDataType<E extends 
java.io.Serializable&Comparable<E>> extends BasicDataType<E> {
+public abstract class ComparableDataType<E extends java.io.Serializable & 
Comparable<E>> extends BasicDataType<E> {
 
     private static final Logger log = 
Logging.getLoggerInstance(ComparableDataType.class);
 
@@ -60,7 +60,7 @@
         }
     }
 
-    protected void cloneRestrictions(BasicDataType<E> origin) {
+    @Override protected void cloneRestrictions(BasicDataType<E> origin) {
         super.cloneRestrictions(origin);
         if (origin instanceof ComparableDataType) {
             ComparableDataType<E> dataType = (ComparableDataType<E>) origin;
@@ -103,7 +103,7 @@
      *
      * If the default value of comparable datatype is somewhy out the range, 
it will be truncated into it.
      */
-    public  E getDefaultValue(Locale locale, Cloud cloud, Field field) {
+    @Override public  E getDefaultValue(Locale locale, Cloud cloud, Field 
field) {
         E def = super.getDefaultValue(locale, cloud, field);
         if (! minRestriction.valid(def, null, null)) {
             def = minRestriction.getValue();
@@ -114,7 +114,7 @@
     }
 
 
-    public void toXml(Element parent) {
+    @Override public void toXml(Element parent) {
         super.toXml(parent);
 
         if (minRestriction.getValue() != null) {
@@ -162,24 +162,24 @@
         maxRestriction.setValue(value);
     }
 
-    public int getEnforceStrength() {
+    @Override public int getEnforceStrength() {
         int enforceStrength = Math.max(super.getEnforceStrength(), 
minRestriction.getEnforceStrength());
         return Math.max(enforceStrength, maxRestriction.getEnforceStrength());
     }
 
-    protected Collection<LocalizedString> 
validateCastValue(Collection<LocalizedString> errors, Object castValue, Object 
value,  Node node, Field field) {
+    @Override protected Collection<LocalizedString> 
validateCastValue(Collection<LocalizedString> errors, Object castValue, Object 
value,  Node node, Field field) {
         errors = super.validateCastValue(errors, castValue, value, node, 
field);
         errors = minRestriction.validate(errors, castValue, node, field);
         errors = maxRestriction.validate(errors, castValue, node, field);
         return errors;
     }
 
-    public ComparableDataType<E> clone(String name) {
+    @Override public ComparableDataType<E> clone(String name) {
         ComparableDataType<E> clone = (ComparableDataType<E>) 
super.clone(name);
         return clone;
     }
 
-    protected StringBuilder toStringBuilder() {
+    @Override protected StringBuilder toStringBuilder() {
         StringBuilder buf = super.toStringBuilder();
         Object minValue = minRestriction.getValue();
         Object maxValue = maxRestriction.getValue();
@@ -218,7 +218,7 @@
             inclusive = inc;
         }
 
-        protected boolean simpleValid(Object v, Node node, Field field) {
+        @Override protected boolean simpleValid(Object v, Node node, Field 
field) {
             if ((v == null) || (getValue() == null)) return true;
             Comparable comparable = (Comparable) v;
             Comparable minimum;
@@ -246,7 +246,7 @@
             super("max" + (inc ? "Inclusive" : "Exclusive"), null);
             inclusive = inc;
         }
-        protected boolean simpleValid(Object v, Node node, Field field) {
+        @Override protected boolean simpleValid(Object v, Node node, Field 
field) {
             if ((v == null) || (getValue() == null)) return true;
             Comparable comparable = (Comparable) v;
             Comparable maximum;


Index: LengthDataType.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/LengthDataType.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- LengthDataType.java 7 Apr 2007 17:11:56 -0000       1.7
+++ LengthDataType.java 1 Sep 2008 17:39:44 -0000       1.8
@@ -16,7 +16,7 @@
  *
  * @author Pierre van Rooden
  * @author Michiel Meeuwissen
- * @version $Id: LengthDataType.java,v 1.7 2007/04/07 17:11:56 nklasens Exp $
+ * @version $Id: LengthDataType.java,v 1.8 2008/09/01 17:39:44 michiel Exp $
  * @since MMBase-1.8
  */
 public interface LengthDataType<E> extends DataType<E> {
@@ -30,10 +30,11 @@
     public long getLength(Object value);
 
     /**
-     * Returns the minimum length of binary values for this datatype.
+     * Returns the minimum length of values for this datatype.
      * @return the minimum length as an <code>int</code>, or 0 if there is no 
minimum length.
      */
     public long getMinLength();
+
     /**
      * Returns the 'minLength' restriction, containing the value, 
errormessages, and fixed status of this attribute.
      * @return the restriction as a [EMAIL PROTECTED] DataType.Restriction}
@@ -48,7 +49,7 @@
     public void setMinLength(long value);
 
     /**
-     * Returns the maximum length of binary values for this datatype.
+     * Returns the maximum length of values for this datatype.
      * @return the maximum length as an <code>long</code>, or a very very big 
value
      * (<code>Long.MAX_VALUE</code>) if there is no maximum length.
      */
@@ -61,7 +62,7 @@
     public DataType.Restriction<Long> getMaxLengthRestriction();
 
     /**
-     * Sets the maximum length of binary values for this datatype.
+     * Sets the maximum length of values for this datatype.
      * @param value see [EMAIL PROTECTED] #getMaxLength}
      * @throws Class Identifier: java.lang.UnsupportedOperationException if 
this datatype is finished
      */


Index: LongDataType.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/LongDataType.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- LongDataType.java   15 Dec 2006 13:38:01 -0000      1.10
+++ LongDataType.java   1 Sep 2008 17:39:44 -0000       1.11
@@ -11,15 +11,15 @@
 import org.mmbase.util.Casting;
 
 /**
- *  * DataType associated with [EMAIL PROTECTED] java.lang.Long},  
NumberDataType, but provides getMin and getMax as long.
+ * DataType associated with [EMAIL PROTECTED] java.lang.Long}, as 
NumberDataType, but provides getMin and getMax as long.
  *
  * @author Pierre van Rooden
  * @author Michiel Meeuwissen
- * @version $Id: LongDataType.java,v 1.10 2006/12/15 13:38:01 michiel Exp $
+ * @version $Id: LongDataType.java,v 1.11 2008/09/01 17:39:44 michiel Exp $
  * @since MMBase-1.8
  */
 public class LongDataType extends NumberDataType<Long> {
-    private static final long serialVersionUID = 1L; // increase this if 
object serialization changes (which we shouldn't do!)
+    private static final long serialVersionUID = 1L; 
     /**
      * @param primitive indicate if a primitive type should be used
      */


Index: NumberDataType.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/NumberDataType.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- NumberDataType.java 12 Aug 2008 17:24:12 -0000      1.30
+++ NumberDataType.java 1 Sep 2008 17:39:44 -0000       1.31
@@ -22,10 +22,10 @@
  * A DataType representing some kind of numeric value, like a floating point 
number or an integer number.
  *
  * @author Pierre van Rooden
- * @version $Id: NumberDataType.java,v 1.30 2008/08/12 17:24:12 michiel Exp $
+ * @version $Id: NumberDataType.java,v 1.31 2008/09/01 17:39:44 michiel Exp $
  * @since MMBase-1.8
  */
-abstract public class NumberDataType<E extends Number&Comparable<E>> extends 
ComparableDataType<E> {
+abstract public class NumberDataType<E extends Number & Comparable<E>> extends 
ComparableDataType<E> {
     private static final Logger log = 
Logging.getLoggerInstance(NumberDataType.class);
 
     private static final long serialVersionUID = 1L;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to