diff --git a/README.md b/README.md index 80ebd15..9c64e1d 100755 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ moving things around. ## Documentation Unfortunately, there is no dedicated documentation available. The only documentation -is the JavaDoc in the source code and see the JUnit test cases for usage examples. +is the JavaDoc in the source code and the JUnit test cases as usage examples. ## Running the tests Execute all JUnit test-cases by running: ``` -ant test +mvn verify ``` ## Authors diff --git a/Zutil.iml b/Zutil.iml index 2f5b8c3..01ebede 100755 --- a/Zutil.iml +++ b/Zutil.iml @@ -35,19 +35,23 @@ + + + + - + - + - + - + diff --git a/pom.xml b/pom.xml index a343f8d..9369d2e 100755 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ se.koc zutil - 1.0.2-${build.number} + 1.0.${build.number} jar Zutil @@ -144,9 +144,9 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.9.1 + 3.1.0 - -Xdoclint:none + none diff --git a/src/zutil/ByteUtil.java b/src/zutil/ByteUtil.java index 6f5413e..8c79159 100755 --- a/src/zutil/ByteUtil.java +++ b/src/zutil/ByteUtil.java @@ -110,7 +110,7 @@ public class ByteUtil { /** * Creates a new byte array with reversed byte ordering - * (LittleEndian -> BigEndian, BigEndian -> LittleEndian) + * (LittleEndian -> BigEndian, BigEndian -> LittleEndian) * * @param data is the byte array that will be reversed. * @return a new byte array that will have the same data but in reverse byte order diff --git a/src/zutil/algo/sort/sortable/SortableDataList.java b/src/zutil/algo/sort/sortable/SortableDataList.java index 8c8a77c..ee655ff 100644 --- a/src/zutil/algo/sort/sortable/SortableDataList.java +++ b/src/zutil/algo/sort/sortable/SortableDataList.java @@ -58,9 +58,9 @@ public interface SortableDataList{ /** * Compares to indexes and returns: - * <0 if a0 if a>b , - * =0 if a=b + *
<0 if a<b , + *
>0 if a>b , + *
=0 if a=b * * @param a is the first index to compare * @param b is the second index to compare @@ -70,9 +70,9 @@ public interface SortableDataList{ /** * Compares to indexes and returns: - * <0 if a0 if a>b , - * =0 if a=b + *
<0 if a<b , + *
>0 if a>b , + *
=0 if a=b * * @param a is the first index to compare * @param b is the second Object to compare diff --git a/src/zutil/db/SQLQuery.java b/src/zutil/db/SQLQuery.java index ab885d2..6b67aeb 100644 --- a/src/zutil/db/SQLQuery.java +++ b/src/zutil/db/SQLQuery.java @@ -257,25 +257,25 @@ public class SQLQuery { return cond("!=", arg1, arg2); } /** - * Less than (arg1 < arg2) + * Less than (arg1 < arg2) */ public SQLWhere LT(String arg1, String arg2){ return cond("<", arg1, arg2); } /** - * Greater than (arg1 > arg2) + * Greater than (arg1 > arg2) */ public SQLWhere GT(String arg1, String arg2){ return cond(">", arg1, arg2); } /** - * Less than or equal (arg1 <= arg2) + * Less than or equal (arg1 <= arg2) */ public SQLWhere LE(String arg1, String arg2){ return cond("<=", arg1, arg2); } /** - * Greater than or equal (arg1 >= arg2) + * Greater than or equal (arg1 >= arg2) */ public SQLWhere GE(String arg1, String arg2){ return cond(">=", arg1, arg2); diff --git a/src/zutil/db/bean/DBBean.java b/src/zutil/db/bean/DBBean.java index 57c6e5a..edbe75d 100755 --- a/src/zutil/db/bean/DBBean.java +++ b/src/zutil/db/bean/DBBean.java @@ -48,19 +48,20 @@ import java.util.logging.Logger; * DBBean will be replaced with the an id which corresponds to the field * of that object. * - * + * <p> * Supported fields: - * *Boolean - * *Integer - * *Short - * *Float - * *Double - * *String - * *Character - * *java.sql.Timestamp - * *DBBean (A Integer reference to another Bean in another table) - * *List<DBBean> (A reference table is used to associate Beans into the list) - * + *
    + *
  • Boolean
  • + *
  • Integer
  • + *
  • Short
  • + *
  • Float
  • + *
  • Double
  • + *
  • String
  • + *
  • Character
  • + *
  • java.sql.Timestamp
  • + *
  • DBBean (A Integer reference to another Bean in another table)
  • + *
  • List<DBBean> (A reference table is used to associate Beans into the list)
  • + *
* @author Ziver */ public abstract class DBBean { diff --git a/src/zutil/image/ImageFilterProcessor.java b/src/zutil/image/ImageFilterProcessor.java index 46a01b7..da457bf 100644 --- a/src/zutil/image/ImageFilterProcessor.java +++ b/src/zutil/image/ImageFilterProcessor.java @@ -101,12 +101,12 @@ public abstract class ImageFilterProcessor { } /** - * Creates a Integer array with the pixel data of the image + * Creates a Integer array with the pixel data of the image <pre> * int[row][col][4] - * 0 -> Alpha data + * 0 -&gt; Alpha data * Red data * Green data - * 4 -> Blue data + * 4 -> Blue data * * @param img is the image to convert * @param cols is the columns of the image diff --git a/src/zutil/image/filter/DitheringFilter.java b/src/zutil/image/filter/DitheringFilter.java index 21174f4..dbb41ff 100755 --- a/src/zutil/image/filter/DitheringFilter.java +++ b/src/zutil/image/filter/DitheringFilter.java @@ -49,12 +49,12 @@ public class DitheringFilter extends ImageFilterProcessor{ /** * Creates a Dithering Effect object * @param img The image to apply the effect on - * @param palette The palette to use on the image + * @param palette The palette to use on the image
      * int[colorCount][4]
-     * 0 -> Alpha data
+     * 0 -> Alpha data
      * 		Red data
      * 		Green data
-     * 4 ->	Blue data
+     * 4 -> Blue data 
*/ public DitheringFilter(BufferedImage img, int[][] palette){ super(img); diff --git a/src/zutil/ml/LinearRegression.java b/src/zutil/ml/LinearRegression.java index 94cb6ce..2965559 100755 --- a/src/zutil/ml/LinearRegression.java +++ b/src/zutil/ml/LinearRegression.java @@ -16,7 +16,7 @@ public class LinearRegression { * Method for calculating a hypothesis value fr a specific input value x. *

* - * h(x) = theta0 * x0 + theta1 * x1 + ... + thetan * xn => transpose(theta) * x + * h(x) = theta0 * x0 + theta1 * x1 + ... + thetan * xn => transpose(theta) * x * */ protected static double[] calculateHypothesis(double[][] x, double[] theta){ diff --git a/src/zutil/net/http/HttpURL.java b/src/zutil/net/http/HttpURL.java index 0803418..2e00e96 100755 --- a/src/zutil/net/http/HttpURL.java +++ b/src/zutil/net/http/HttpURL.java @@ -103,7 +103,7 @@ public class HttpURL { * Generates the parameter string in a URL. * * e.g. - * "key=value&key2=value&..." + * "key=value&key2=value&..." */ public String getParameterString(){ StringBuilder param = new StringBuilder(); diff --git a/src/zutil/parser/Templator.java b/src/zutil/parser/Templator.java index bbe56a3..10b3381 100755 --- a/src/zutil/parser/Templator.java +++ b/src/zutil/parser/Templator.java @@ -81,8 +81,8 @@ import java.util.logging.Logger; * Comment, will be ignored. * * - * TODO: {{> file}}: include file - * TODO: {{=<% %>=}}: change delimiter + * TODO: {{> file}}: include file + * TODO: {{=<% %>=}}: change delimiter * * @author Ziver koc */ diff --git a/src/zutil/parser/json/JSONObjectInputStream.java b/src/zutil/parser/json/JSONObjectInputStream.java index dabb625..8e2bc74 100755 --- a/src/zutil/parser/json/JSONObjectInputStream.java +++ b/src/zutil/parser/json/JSONObjectInputStream.java @@ -29,7 +29,6 @@ import zutil.log.LogUtil; import zutil.parser.Base64Decoder; import zutil.parser.DataNode; -import javax.activation.UnsupportedDataTypeException; import java.io.*; import java.lang.reflect.Array; import java.lang.reflect.Field; @@ -123,7 +122,7 @@ public class JSONObjectInputStream extends InputStream implements ObjectInput, C @SuppressWarnings({ "rawtypes", "unchecked" }) - protected Object readType(Class type, Class[] genType, String key, DataNode json) throws IllegalAccessException, ClassNotFoundException, InstantiationException, UnsupportedDataTypeException, NoSuchFieldException { + protected Object readType(Class type, Class[] genType, String key, DataNode json) throws IllegalAccessException, ClassNotFoundException, InstantiationException, NoSuchFieldException { if(json == null || type == null) return null; // Field type is a primitive? @@ -171,7 +170,7 @@ public class JSONObjectInputStream extends InputStream implements ObjectInput, C } - protected Object readObject(Class type, String key, DataNode json) throws IllegalAccessException, InstantiationException, ClassNotFoundException, IllegalArgumentException, UnsupportedDataTypeException, NoSuchFieldException { + protected Object readObject(Class type, String key, DataNode json) throws IllegalAccessException, InstantiationException, ClassNotFoundException, IllegalArgumentException, NoSuchFieldException { // Only parse if json is a map if(json == null || !json.isMap()) return null; diff --git a/src/zutil/parser/json/JSONObjectOutputStream.java b/src/zutil/parser/json/JSONObjectOutputStream.java index 0d0b175..ac5707d 100755 --- a/src/zutil/parser/json/JSONObjectOutputStream.java +++ b/src/zutil/parser/json/JSONObjectOutputStream.java @@ -30,7 +30,6 @@ import zutil.parser.Base64Encoder; import zutil.parser.DataNode; import zutil.parser.DataNode.DataType; -import javax.activation.UnsupportedDataTypeException; import java.io.*; import java.lang.reflect.Array; import java.lang.reflect.Field; @@ -169,7 +168,7 @@ public class JSONObjectOutputStream extends OutputStream implements ObjectOutput return root; } - private DataNode getPrimitiveDataNode(Class type, Object value) throws UnsupportedDataTypeException, IllegalArgumentException { + private DataNode getPrimitiveDataNode(Class type, Object value) throws IllegalArgumentException { DataNode node; if (type == int.class || type == Integer.class || @@ -188,7 +187,7 @@ public class JSONObjectOutputStream extends OutputStream implements ObjectOutput type == Character.class) node = new DataNode(DataType.String); else - throw new UnsupportedDataTypeException("Unsupported primitive data type: "+type.getName()); + throw new IllegalArgumentException("Unsupported primitive data type: "+type.getName()); if(value != null) node.set(value.toString());