Fixed javadoc warnings

This commit is contained in:
Ziver Koc 2017-10-21 18:39:06 +02:00
parent 2db7cd2e49
commit 1cab6609c0
20 changed files with 1301 additions and 1305 deletions

View file

@ -43,6 +43,15 @@
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.36" level="project" /> <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.36" level="project" />
<orderEntry type="library" name="Maven: org.xerial:sqlite-jdbc:3.8.11.2" level="project" /> <orderEntry type="library" name="Maven: org.xerial:sqlite-jdbc:3.8.11.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" name="Maven: com.carrotsearch:junit-benchmarks:0.7.2" level="project" />
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.1" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
<orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
<orderEntry type="library" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.36" level="project" />
<orderEntry type="library" name="Maven: org.xerial:sqlite-jdbc:3.8.11.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" /> <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: com.carrotsearch:junit-benchmarks:0.7.2" level="project" /> <orderEntry type="library" name="Maven: com.carrotsearch:junit-benchmarks:0.7.2" level="project" />
</component> </component>

View file

@ -99,7 +99,7 @@ public class Hasher {
/** /**
* Returns the MD5 hash of the given file * Returns the MD5 hash of the given file
* *
* @param object is the file to hash * @param file is the file to hash
* @return an String containing the hash * @return an String containing the hash
*/ */
public static String MD5(File file) throws IOException{ public static String MD5(File file) throws IOException{

View file

@ -192,7 +192,6 @@ public class StringUtil {
* Trims the whitespace and quotes if the string starts and ends with one * Trims the whitespace and quotes if the string starts and ends with one
* *
* @param str is the string to trim * @param str is the string to trim
* @return
*/ */
public static String trimQuotes(String str){ public static String trimQuotes(String str){
if( str == null ) if( str == null )

View file

@ -33,7 +33,7 @@ import java.math.BigInteger;
* The algorithm solves the discreet log equation x^2 = n mod p * The algorithm solves the discreet log equation x^2 = n mod p
* *
* @author Ziver * @author Ziver
* @see http://en.wikipedia.org/wiki/Shanks-Tonelli_algorithm * @see <a href="http://en.wikipedia.org/wiki/Shanks-Tonelli_algorithm">Wikipedia</a>
*/ */
public class ShanksTonelliAlgo { public class ShanksTonelliAlgo {
public static BigInteger calc(BigInteger n, BigInteger p){ public static BigInteger calc(BigInteger n, BigInteger p){

View file

@ -40,7 +40,7 @@ public class QuickSort{
/** /**
* Sort the elements in ascending order using Quicksort. * Sort the elements in ascending order using Quicksort.
* *
* @param A is the list to sort. * @param list is the list to sort.
*/ */
public static void sort(SortableDataList<?> list){ public static void sort(SortableDataList<?> list){
sort(list, 0, list.size()-1, MIDDLE_PIVOT, true); sort(list, 0, list.size()-1, MIDDLE_PIVOT, true);
@ -49,7 +49,7 @@ public class QuickSort{
/** /**
* Sort the elements in ascending order using Quicksort. * Sort the elements in ascending order using Quicksort.
* *
* @param A is the list to sort. * @param list is the list to sort.
* @param type is the type of pivot * @param type is the type of pivot
* @param insert is if insertion sort will be used * @param insert is if insertion sort will be used
*/ */
@ -62,7 +62,7 @@ public class QuickSort{
* Reference: http://www.inf.fh-flensburg.de/lang/algorithmen/sortieren/quick/quicken.htm * Reference: http://www.inf.fh-flensburg.de/lang/algorithmen/sortieren/quick/quicken.htm
* Complexity: O(n*log n) normally, but O(n^2) if the pivot is bad * Complexity: O(n*log n) normally, but O(n^2) if the pivot is bad
* *
* @param A is the list to sort. * @param list is the list to sort.
* @param start is the index to start from * @param start is the index to start from
* @param stop is the index to stop * @param stop is the index to stop
* @param type is the type of pivot to use * @param type is the type of pivot to use

View file

@ -39,7 +39,7 @@ public class SimpleSort{
* witch is the slowest of the algorithms. * witch is the slowest of the algorithms.
* Complexity: O(n^2). * Complexity: O(n^2).
* *
* @param A is the list to sort. * @param list is the list to sort.
*/ */
public static void bubbleSort(SortableDataList<?> list){ public static void bubbleSort(SortableDataList<?> list){
bubbleSort(list, 0, list.size()); bubbleSort(list, 0, list.size());
@ -49,7 +49,7 @@ public class SimpleSort{
* witch is the slowest of the algorithms. * witch is the slowest of the algorithms.
* Complexity: O(n^2). * Complexity: O(n^2).
* *
* @param A is an array of integers. * @param list is an array of integers.
* @param start is the index to start from * @param start is the index to start from
* @param stop is the index to stop * @param stop is the index to stop
*/ */
@ -100,7 +100,7 @@ public class SimpleSort{
* witch in practice is 5 times faster than bubble sort. * witch in practice is 5 times faster than bubble sort.
* Complexity: O(n^2). * Complexity: O(n^2).
* *
* @param A is a list to sort. * @param list is a list to sort.
*/ */
public static void insertionSort(SortableDataList<?> list){ public static void insertionSort(SortableDataList<?> list){
insertionSort(list, 0, list.size()); insertionSort(list, 0, list.size());
@ -110,7 +110,7 @@ public class SimpleSort{
* witch in practice is 5 times faster than bubble sort. * witch in practice is 5 times faster than bubble sort.
* Complexity: O(n^2). * Complexity: O(n^2).
* *
* @param A is an array of integers. * @param list is an array of integers.
* @param start is the index to start from * @param start is the index to start from
* @param stop is the index to stop * @param stop is the index to stop
*/ */

View file

@ -30,9 +30,8 @@ public interface SortableDataList<T>{
* Returns a is a specific index i the list * Returns a is a specific index i the list
* *
* @param i is the index * @param i is the index
* @return
*/ */
public T get(int i); T get(int i);
/** /**
* Sets an Object in the specified index * Sets an Object in the specified index
@ -40,14 +39,14 @@ public interface SortableDataList<T>{
* @param i is the index * @param i is the index
* @param o is the Object * @param o is the Object
*/ */
public void set(int i, T o); void set(int i, T o);
/** /**
* Returns the size of the list * Returns the size of the list
* *
* @return the size of the list * @return the size of the list
*/ */
public int size(); int size();
/** /**
* Swaps the given indexes * Swaps the given indexes
@ -55,7 +54,7 @@ public interface SortableDataList<T>{
* @param a is the first index * @param a is the first index
* @param b is the second index * @param b is the second index
*/ */
public void swap(int a, int b); void swap(int a, int b);
/** /**
* Compares to indexes and returns: * Compares to indexes and returns:
@ -67,7 +66,7 @@ public interface SortableDataList<T>{
* @param b is the second index to compare * @param b is the second index to compare
* @return Look at the info * @return Look at the info
*/ */
public int compare(int a, int b); int compare(int a, int b);
/** /**
* Compares to indexes and returns: * Compares to indexes and returns:
@ -79,6 +78,6 @@ public interface SortableDataList<T>{
* @param b is the second Object to compare * @param b is the second Object to compare
* @return Look at the info * @return Look at the info
*/ */
public int compare(int a, T b); int compare(int a, T b);
} }

View file

@ -117,7 +117,7 @@ public abstract class AbstractChart extends JPanel{
* This method is called after the chart scale has been drawn. * This method is called after the chart scale has been drawn.
* This method will draw the actual chart * This method will draw the actual chart
* *
* @param g is the Graphics object that will paint the chart * @param g2 is the Graphics object that will paint the chart
* @param bound is the bounds of the chart, the drawing should not exceed this bound * @param bound is the bounds of the chart, the drawing should not exceed this bound
*/ */
protected abstract void drawChart(Graphics2D g2, Rectangle bound); protected abstract void drawChart(Graphics2D g2, Rectangle bound);

View file

@ -13,7 +13,7 @@ import java.util.logging.Logger;
/** /**
* A intermediate class for loading Objects of generic Classes. * A intermediate class for loading Objects of generic Classes.
* The extending class must set the "superBean" parameter to true in {@link @DBBean.DBTable}. * The extending class must set the "superBean" parameter to true in {@link DBBean.DBTable}.
* The Object that is stored must use Configurator to define what fields that should be stored. * The Object that is stored must use Configurator to define what fields that should be stored.
* *
* This class needs to fields in DB: * This class needs to fields in DB:

View file

@ -35,10 +35,6 @@ public class RAWImageUtil {
* Returns the peek value in the image * Returns the peek value in the image
* *
* @param data The image data * @param data The image data
* @param startX is the x pixel of the image to start from
* @param startY is the y pixel of the image to start from
* @param stopX is the x pixel of the image to stop
* @param stopY is the y pixel of the image to stop
* @return The peak value of the image * @return The peak value of the image
*/ */
public static int getPeakValue(int[][][] data) { public static int getPeakValue(int[][][] data) {
@ -53,7 +49,7 @@ public class RAWImageUtil {
* @param startY is the y pixel of the image to start from * @param startY is the y pixel of the image to start from
* @param stopX is the x pixel of the image to stop * @param stopX is the x pixel of the image to stop
* @param stopY is the y pixel of the image to stop * @param stopY is the y pixel of the image to stop
* @return The peak value of the image * @return the peak value of the image
*/ */
public static int getPeakValue(int[][][] data, int startX, int startY, int stopX, int stopY) { public static int getPeakValue(int[][][] data, int startX, int startY, int stopX, int stopY) {
int peak = 0; int peak = 0;
@ -70,7 +66,7 @@ public class RAWImageUtil {
/** /**
* Normalizes the image data by the given scale * Normalizes the image data by the given scale
* *
* @param data The image data * @param data the image data
* @param startX is the x pixel of the image to start from * @param startX is the x pixel of the image to start from
* @param startY is the y pixel of the image to start from * @param startY is the y pixel of the image to start from
* @param stopX is the x pixel of the image to stop * @param stopX is the x pixel of the image to stop
@ -90,13 +86,13 @@ public class RAWImageUtil {
/** /**
* Normalizes the image data by the given scale * Normalizes the image data by the given scale
* *
* @param output The output data array * @param output the output data array
* @param data The image data * @param data the image data
* @param startX is the x pixel of the image to start from * @param startX is the x pixel of the image to start from
* @param startY is the y pixel of the image to start from * @param startY is the y pixel of the image to start from
* @param stopX is the x pixel of the image to stop * @param stopX is the x pixel of the image to stop
* @param stopY is the y pixel of the image to stop * @param stopY is the y pixel of the image to stop
* @param scale The scale to normalize the image by * @param scale the scale to normalize the image by
*/ */
public static void normalize(int[][][] output, int[][][] data, int startX, int startY, int stopX, int stopY, double scale) { public static void normalize(int[][][] output, int[][][] data, int startX, int startY, int stopX, int stopY, double scale) {
for(int y=startY; y<stopY ;y++){ for(int y=startY; y<stopY ;y++){
@ -117,7 +113,7 @@ public class RAWImageUtil {
* @param startY is the y pixel of the image to start from * @param startY is the y pixel of the image to start from
* @param stopX is the x pixel of the image to stop * @param stopX is the x pixel of the image to stop
* @param stopY is the y pixel of the image to stop * @param stopY is the y pixel of the image to stop
* @return The RMS value for the image * @return the RMS value for the image
*/ */
public static int getRMS(int[][][] data, int startX, int startY, int stopX, int stopY){ public static int getRMS(int[][][] data, int startX, int startY, int stopX, int stopY){
int pixelCount = 0; int pixelCount = 0;
@ -277,11 +273,11 @@ public class RAWImageUtil {
* @param xStart X start position on the source * @param xStart X start position on the source
* @param yStart Y start position on the source * @param yStart Y start position on the source
* @param width The amount of pixels to copy * @param width The amount of pixels to copy
* @param hight The amount of pixels to copy * @param height The amount of pixels to copy
* @return A copy of the data array * @return A copy of the data array
*/ */
public static int[][][] crop(int[][][] data, int xStart, int yStart, int width, int hight){ public static int[][][] crop(int[][][] data, int xStart, int yStart, int width, int height){
return crop(data, xStart, yStart, null, 0, 0, width, hight); return crop(data, xStart, yStart, null, 0, 0, width, height);
} }
/** /**
@ -294,13 +290,13 @@ public class RAWImageUtil {
* @param xCrop X start position in the destination * @param xCrop X start position in the destination
* @param yCrop Y start position in the destination * @param yCrop Y start position in the destination
* @param width The amount of pixels to copy * @param width The amount of pixels to copy
* @param hight The amount of pixels to copy * @param height The amount of pixels to copy
* @return A copy of the data array * @return A copy of the data array
*/ */
public static int[][][] crop(int[][][] data, int xData, int yData, int[][][] crop, int xCrop, int yCrop, int width, int hight){ public static int[][][] crop(int[][][] data, int xData, int yData, int[][][] crop, int xCrop, int yCrop, int width, int height){
if(crop==null) crop = new int[width][hight][4]; if(crop==null) crop = new int[width][height][4];
for(int y=0; y<width ;y++){ for(int y=0; y<width ;y++){
for(int x=0; x<hight ;x++){ for(int x=0; x<height ;x++){
crop[y+yData][x+xData][0] = data[y+yCrop][x+xCrop][0]; crop[y+yData][x+xData][0] = data[y+yCrop][x+xCrop][0];
crop[y+yData][x+xData][1] = data[y+yCrop][x+xCrop][1]; crop[y+yData][x+xData][1] = data[y+yCrop][x+xCrop][1];
crop[y+yData][x+xData][2] = data[y+yCrop][x+xCrop][2]; crop[y+yData][x+xData][2] = data[y+yCrop][x+xCrop][2];
@ -381,9 +377,6 @@ public class RAWImageUtil {
/** /**
* This method clips the values of a color so that it * This method clips the values of a color so that it
* is in the range 0-255 * is in the range 0-255
*
* @param color
* @return
*/ */
public static int clip(int color){ public static int clip(int color){
if(color < 0) if(color < 0)

View file

@ -59,7 +59,7 @@ public class StringOutputStream extends OutputStream{
} }
/** /**
* Same as {@link OutputStream:clear()} * Same as {@link OutputStream#close()}
*/ */
@Override @Override
public void close() {} public void close() {}

View file

@ -273,7 +273,6 @@ public class FileUtil {
* *
* @param file is the name of the file * @param file is the name of the file
* @param ext is the new extension, without the dot * @param ext is the new extension, without the dot
* @return
*/ */
public static String replaceExtension(String file, String ext) { public static String replaceExtension(String file, String ext) {
if( file == null ) if( file == null )

View file

@ -50,34 +50,34 @@ import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
/** /**
* <XMP> * <pre>
* Example web.xml: * Example web.xml:
* <servlet> * &lt;servlet&gt;
* <servlet-name>Upload</servlet-name> * &lt;servlet-name&gt;Upload&lt;/servlet-name&gt;
* <servlet-class>zall.util.AjaxFileUpload</servlet-class> * &lt;servlet-class&gt;zall.util.AjaxFileUpload&lt;/servlet-class&gt;
* <init-param> * &lt;init-param&gt;
* <param-name>JAVASCRIPT</param-name> * &lt;param-name&gt;JAVASCRIPT&lt;/param-name&gt;
* <param-value>{FILE_PATH}</param-value> * &lt;param-value&gt;{FILE_PATH}&lt;/param-value&gt;
* </init-param> * &lt;/init-param&gt;
* <init-param> * &lt;init-param&gt;
* <param-name>TEMP_PATH</param-name> * &lt;param-name&gt;TEMP_PATH&lt;/param-name&gt;
* <param-value>SYSTEM|SERVLET|{PATH}</param-value> * &lt;param-value&gt;SYSTEM|SERVLET|{PATH}&lt;/param-value&gt;
* </init-param> * &lt;/init-param&gt;
* </servlet> * &lt;/servlet&gt;
* *
* *
* HTML Header: * HTML Header:
* <script type='text/javascript' src='{PATH_TO_SERVLET}?js'></script> * &lt;script type='text/javascript' src='{PATH_TO_SERVLET}?js'&gt;&lt;/script&gt;
* *
* *
* HTML Body: * HTML Body:
* <FORM id="AjaxFileUpload"> * &lt;FORM id="AjaxFileUpload"&gt;
* <input type="file" multiple name="file" /> * &lt;input type="file" multiple name="file" /&gt;
* </FORM> * &lt;/FORM&gt;
* <UL id="UploadQueue"></UL> * &lt;UL id="UploadQueue"&gt;&lt;/UL&gt;
* *
* *
* </XMP> * </pre>
* @author Ziver * @author Ziver
* *
*/ */

View file

@ -37,8 +37,6 @@ public class ChatMessage implements Message {
/** /**
* Registers the user to the main chat * Registers the user to the main chat
*
* @param name Name of user
*/ */
public ChatMessage(){ public ChatMessage(){
this("", "", ChatMessageType.REGISTER); this("", "", ChatMessageType.REGISTER);

View file

@ -38,22 +38,22 @@ import java.lang.annotation.Target;
* private static class Test implements WSInterface{ * private static class Test implements WSInterface{
* public Test(){} * public Test(){}
* *
* @WSDocumentation("blabla") * &#64;WSDocumentation("blabla")
* @WSDLParamDocumentation("olle = a variable?") * &#64;WSDLParamDocumentation("olle = a variable?")
* public void pubZ( * public void pubZ(
* @WSParamName("olle") int lol) * &#64;WSParamName("olle") int lol)
* throws Exception{ * throws Exception{
* .... * ....
* } * }
* *
* @WSReturnName("param") * &#64;WSReturnName("param")
* public String pubA( * public String pubA(
* @WSParamName(value="lol", optional=true) String lol) * &#64;WSParamName(value="lol", optional=true) String lol)
* throws Exception{ * throws Exception{
* .... * ....
* } * }
* *
* @WSIgnore() * &#64;WSIgnore()
* public void privaZ(....){ * public void privaZ(....){
* ... * ...
* } * }
@ -71,7 +71,7 @@ public interface WSInterface {
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER) @Target(ElementType.PARAMETER)
public @interface WSParamName { @interface WSParamName {
String value(); String value();
boolean optional() default false; boolean optional() default false;
} }
@ -84,7 +84,7 @@ public interface WSInterface {
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD) @Target(ElementType.METHOD)
public @interface WSReturnName { @interface WSReturnName {
String value(); String value();
} }
@ -104,7 +104,7 @@ public interface WSInterface {
* @author Ziver * @author Ziver
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
public @interface WSDocumentation{ @interface WSDocumentation{
String value(); String value();
} }
@ -115,7 +115,7 @@ public interface WSInterface {
* @author Ziver * @author Ziver
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
public @interface WSParamDocumentation{ @interface WSParamDocumentation{
String value(); String value();
} }
@ -126,7 +126,7 @@ public interface WSInterface {
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD) @Target(ElementType.METHOD)
public @interface WSHeader { } @interface WSHeader { }
/** /**
* Specifies the name space for method. * Specifies the name space for method.
@ -134,8 +134,7 @@ public interface WSInterface {
* @author Ziver * @author Ziver
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
//@Target(ElementType.TYPE) @interface WSNamespace {
public @interface WSNamespace {
String value(); String value();
} }
} }

View file

@ -38,9 +38,9 @@ import java.lang.reflect.Field;
* *
* <pre> * <pre>
* private static class TestObject implements WSReturnObject{ * private static class TestObject implements WSReturnObject{
* @WSValueName("name") * &#64;WSValueName("name")
* public String name; * public String name;
* @WSValueName("lastname") * &#64;WSValueName("lastname")
* public String lastname; * public String lastname;
* *
* public TestObject(String n, String l){ * public TestObject(String n, String l){

View file

@ -41,7 +41,6 @@ public class BEncodedParser {
* Returns the representation of the data in the BEncoded string * Returns the representation of the data in the BEncoded string
* *
* @param data is the data to be decoded * @param data is the data to be decoded
* @return
*/ */
public static DataNode read(String data) throws ParseException { public static DataNode read(String data) throws ParseException {
return decode_BEncoded(new MutableInt(), new StringBuilder(data)); return decode_BEncoded(new MutableInt(), new StringBuilder(data));

View file

@ -92,7 +92,7 @@ public class BloomFilter<T extends Serializable> implements Set<T>, Serializable
} }
/** /**
* @return clears the filter * Clears the filter
*/ */
public void clear() { public void clear() {
content_size = 0; content_size = 0;
@ -157,7 +157,7 @@ public class BloomFilter<T extends Serializable> implements Set<T>, Serializable
/** /**
* @return The false positive probability of the current state of the filter * @return The false positive probability of the current state of the filter
*/ */
public double falsePosetiveProbability(){ public double falsePositiveProbability(){
return Math.pow(0.6185, bits.size()/content_size); return Math.pow(0.6185, bits.size()/content_size);
} }
@ -171,6 +171,7 @@ public class BloomFilter<T extends Serializable> implements Set<T>, Serializable
this.k = k; this.k = k;
} }
//********************************************************************* //*********************************************************************
//********************************************************************* //*********************************************************************
public Object[] toArray() { public Object[] toArray() {

View file

@ -90,7 +90,7 @@ public class WizardActionHandler implements ActionListener, FocusListener, ListS
/** /**
* Registers the state of the event source * Registers the state of the event source
* @param e is the event * @param c is the event
*/ */
public void registerValue(Component c) { public void registerValue(Component c) {
/** /**

View file

@ -70,7 +70,7 @@ public class BloomFilterTest extends TestCase {
falsePositives++; falsePositives++;
} }
} }
double expectedFP = bf.falsePosetiveProbability(); double expectedFP = bf.falsePositiveProbability();
double actualFP = (double) falsePositives / (double) addCount; double actualFP = (double) falsePositives / (double) addCount;
System.out.println("Got " + falsePositives System.out.println("Got " + falsePositives
+ " false positives out of " + addCount + " added items, rate = " + " false positives out of " + addCount + " added items, rate = "