Fixed javadoc warnings
This commit is contained in:
parent
2db7cd2e49
commit
1cab6609c0
20 changed files with 1301 additions and 1305 deletions
|
|
@ -43,6 +43,15 @@
|
|||
<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: 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: com.carrotsearch:junit-benchmarks:0.7.2" level="project" />
|
||||
</component>
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ public class Hasher {
|
|||
/**
|
||||
* 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
|
||||
*/
|
||||
public static String MD5(File file) throws IOException{
|
||||
|
|
|
|||
|
|
@ -192,7 +192,6 @@ public class StringUtil {
|
|||
* Trims the whitespace and quotes if the string starts and ends with one
|
||||
*
|
||||
* @param str is the string to trim
|
||||
* @return
|
||||
*/
|
||||
public static String trimQuotes(String str){
|
||||
if( str == null )
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import java.math.BigInteger;
|
|||
* The algorithm solves the discreet log equation x^2 = n mod p
|
||||
*
|
||||
* @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 static BigInteger calc(BigInteger n, BigInteger p){
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class 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){
|
||||
sort(list, 0, list.size()-1, MIDDLE_PIVOT, true);
|
||||
|
|
@ -49,7 +49,7 @@ public class 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 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
|
||||
* 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 stop is the index to stop
|
||||
* @param type is the type of pivot to use
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class SimpleSort{
|
|||
* witch is the slowest of the algorithms.
|
||||
* Complexity: O(n^2).
|
||||
*
|
||||
* @param A is the list to sort.
|
||||
* @param list is the list to sort.
|
||||
*/
|
||||
public static void bubbleSort(SortableDataList<?> list){
|
||||
bubbleSort(list, 0, list.size());
|
||||
|
|
@ -49,7 +49,7 @@ public class SimpleSort{
|
|||
* witch is the slowest of the algorithms.
|
||||
* 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 stop is the index to stop
|
||||
*/
|
||||
|
|
@ -100,7 +100,7 @@ public class SimpleSort{
|
|||
* witch in practice is 5 times faster than bubble sort.
|
||||
* Complexity: O(n^2).
|
||||
*
|
||||
* @param A is a list to sort.
|
||||
* @param list is a list to sort.
|
||||
*/
|
||||
public static void insertionSort(SortableDataList<?> list){
|
||||
insertionSort(list, 0, list.size());
|
||||
|
|
@ -110,7 +110,7 @@ public class SimpleSort{
|
|||
* witch in practice is 5 times faster than bubble sort.
|
||||
* 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 stop is the index to stop
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -30,9 +30,8 @@ public interface SortableDataList<T>{
|
|||
* Returns a is a specific index i the list
|
||||
*
|
||||
* @param i is the index
|
||||
* @return
|
||||
*/
|
||||
public T get(int i);
|
||||
T get(int i);
|
||||
|
||||
/**
|
||||
* Sets an Object in the specified index
|
||||
|
|
@ -40,14 +39,14 @@ public interface SortableDataList<T>{
|
|||
* @param i is the index
|
||||
* @param o is the Object
|
||||
*/
|
||||
public void set(int i, T o);
|
||||
void set(int i, T o);
|
||||
|
||||
/**
|
||||
* Returns the size of the list
|
||||
*
|
||||
* @return the size of the list
|
||||
*/
|
||||
public int size();
|
||||
int size();
|
||||
|
||||
/**
|
||||
* Swaps the given indexes
|
||||
|
|
@ -55,7 +54,7 @@ public interface SortableDataList<T>{
|
|||
* @param a is the first 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:
|
||||
|
|
@ -67,7 +66,7 @@ public interface SortableDataList<T>{
|
|||
* @param b is the second index to compare
|
||||
* @return Look at the info
|
||||
*/
|
||||
public int compare(int a, int b);
|
||||
int compare(int a, int b);
|
||||
|
||||
/**
|
||||
* Compares to indexes and returns:
|
||||
|
|
@ -79,6 +78,6 @@ public interface SortableDataList<T>{
|
|||
* @param b is the second Object to compare
|
||||
* @return Look at the info
|
||||
*/
|
||||
public int compare(int a, T b);
|
||||
int compare(int a, T b);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ public abstract class AbstractChart extends JPanel{
|
|||
* This method is called after the chart scale has been drawn.
|
||||
* 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
|
||||
*/
|
||||
protected abstract void drawChart(Graphics2D g2, Rectangle bound);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import java.util.logging.Logger;
|
|||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* This class needs to fields in DB:
|
||||
|
|
|
|||
|
|
@ -35,10 +35,6 @@ public class RAWImageUtil {
|
|||
* Returns the peek value in the image
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
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 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, int startX, int startY, int stopX, int stopY) {
|
||||
int peak = 0;
|
||||
|
|
@ -70,7 +66,7 @@ public class RAWImageUtil {
|
|||
/**
|
||||
* 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 startY is the y pixel of the image to start from
|
||||
* @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
|
||||
*
|
||||
* @param output The output data array
|
||||
* @param data The image data
|
||||
* @param output the output data array
|
||||
* @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
|
||||
* @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) {
|
||||
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 stopX is the x 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){
|
||||
int pixelCount = 0;
|
||||
|
|
@ -277,11 +273,11 @@ public class RAWImageUtil {
|
|||
* @param xStart X start position on the source
|
||||
* @param yStart Y start position on the source
|
||||
* @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
|
||||
*/
|
||||
public static int[][][] crop(int[][][] data, int xStart, int yStart, int width, int hight){
|
||||
return crop(data, xStart, yStart, null, 0, 0, width, hight);
|
||||
public static int[][][] crop(int[][][] data, int xStart, int yStart, int width, int height){
|
||||
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 yCrop Y start position in the destination
|
||||
* @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
|
||||
*/
|
||||
public static int[][][] crop(int[][][] data, int xData, int yData, int[][][] crop, int xCrop, int yCrop, int width, int hight){
|
||||
if(crop==null) crop = new int[width][hight][4];
|
||||
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][height][4];
|
||||
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][1] = data[y+yCrop][x+xCrop][1];
|
||||
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
|
||||
* is in the range 0-255
|
||||
*
|
||||
* @param color
|
||||
* @return
|
||||
*/
|
||||
public static int clip(int color){
|
||||
if(color < 0)
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class StringOutputStream extends OutputStream{
|
|||
}
|
||||
|
||||
/**
|
||||
* Same as {@link OutputStream:clear()}
|
||||
* Same as {@link OutputStream#close()}
|
||||
*/
|
||||
@Override
|
||||
public void close() {}
|
||||
|
|
|
|||
|
|
@ -273,7 +273,6 @@ public class FileUtil {
|
|||
*
|
||||
* @param file is the name of the file
|
||||
* @param ext is the new extension, without the dot
|
||||
* @return
|
||||
*/
|
||||
public static String replaceExtension(String file, String ext) {
|
||||
if( file == null )
|
||||
|
|
|
|||
|
|
@ -50,34 +50,34 @@ import java.util.logging.Level;
|
|||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* <XMP>
|
||||
* <pre>
|
||||
* Example web.xml:
|
||||
* <servlet>
|
||||
* <servlet-name>Upload</servlet-name>
|
||||
* <servlet-class>zall.util.AjaxFileUpload</servlet-class>
|
||||
* <init-param>
|
||||
* <param-name>JAVASCRIPT</param-name>
|
||||
* <param-value>{FILE_PATH}</param-value>
|
||||
* </init-param>
|
||||
* <init-param>
|
||||
* <param-name>TEMP_PATH</param-name>
|
||||
* <param-value>SYSTEM|SERVLET|{PATH}</param-value>
|
||||
* </init-param>
|
||||
* </servlet>
|
||||
* <servlet>
|
||||
* <servlet-name>Upload</servlet-name>
|
||||
* <servlet-class>zall.util.AjaxFileUpload</servlet-class>
|
||||
* <init-param>
|
||||
* <param-name>JAVASCRIPT</param-name>
|
||||
* <param-value>{FILE_PATH}</param-value>
|
||||
* </init-param>
|
||||
* <init-param>
|
||||
* <param-name>TEMP_PATH</param-name>
|
||||
* <param-value>SYSTEM|SERVLET|{PATH}</param-value>
|
||||
* </init-param>
|
||||
* </servlet>
|
||||
*
|
||||
*
|
||||
* HTML Header:
|
||||
* <script type='text/javascript' src='{PATH_TO_SERVLET}?js'></script>
|
||||
* <script type='text/javascript' src='{PATH_TO_SERVLET}?js'></script>
|
||||
*
|
||||
*
|
||||
* HTML Body:
|
||||
* <FORM id="AjaxFileUpload">
|
||||
* <input type="file" multiple name="file" />
|
||||
* </FORM>
|
||||
* <UL id="UploadQueue"></UL>
|
||||
* <FORM id="AjaxFileUpload">
|
||||
* <input type="file" multiple name="file" />
|
||||
* </FORM>
|
||||
* <UL id="UploadQueue"></UL>
|
||||
*
|
||||
*
|
||||
* </XMP>
|
||||
* </pre>
|
||||
* @author Ziver
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ public class ChatMessage implements Message {
|
|||
|
||||
/**
|
||||
* Registers the user to the main chat
|
||||
*
|
||||
* @param name Name of user
|
||||
*/
|
||||
public ChatMessage(){
|
||||
this("", "", ChatMessageType.REGISTER);
|
||||
|
|
|
|||
|
|
@ -38,22 +38,22 @@ import java.lang.annotation.Target;
|
|||
* private static class Test implements WSInterface{
|
||||
* public Test(){}
|
||||
*
|
||||
* @WSDocumentation("blabla")
|
||||
* @WSDLParamDocumentation("olle = a variable?")
|
||||
* @WSDocumentation("blabla")
|
||||
* @WSDLParamDocumentation("olle = a variable?")
|
||||
* public void pubZ(
|
||||
* @WSParamName("olle") int lol)
|
||||
* @WSParamName("olle") int lol)
|
||||
* throws Exception{
|
||||
* ....
|
||||
* }
|
||||
*
|
||||
* @WSReturnName("param")
|
||||
* @WSReturnName("param")
|
||||
* public String pubA(
|
||||
* @WSParamName(value="lol", optional=true) String lol)
|
||||
* @WSParamName(value="lol", optional=true) String lol)
|
||||
* throws Exception{
|
||||
* ....
|
||||
* }
|
||||
*
|
||||
* @WSIgnore()
|
||||
* @WSIgnore()
|
||||
* public void privaZ(....){
|
||||
* ...
|
||||
* }
|
||||
|
|
@ -71,7 +71,7 @@ public interface WSInterface {
|
|||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.PARAMETER)
|
||||
public @interface WSParamName {
|
||||
@interface WSParamName {
|
||||
String value();
|
||||
boolean optional() default false;
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@ public interface WSInterface {
|
|||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface WSReturnName {
|
||||
@interface WSReturnName {
|
||||
String value();
|
||||
}
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ public interface WSInterface {
|
|||
* @author Ziver
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface WSDocumentation{
|
||||
@interface WSDocumentation{
|
||||
String value();
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ public interface WSInterface {
|
|||
* @author Ziver
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface WSParamDocumentation{
|
||||
@interface WSParamDocumentation{
|
||||
String value();
|
||||
}
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ public interface WSInterface {
|
|||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface WSHeader { }
|
||||
@interface WSHeader { }
|
||||
|
||||
/**
|
||||
* Specifies the name space for method.
|
||||
|
|
@ -134,8 +134,7 @@ public interface WSInterface {
|
|||
* @author Ziver
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
//@Target(ElementType.TYPE)
|
||||
public @interface WSNamespace {
|
||||
@interface WSNamespace {
|
||||
String value();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ import java.lang.reflect.Field;
|
|||
*
|
||||
* <pre>
|
||||
* private static class TestObject implements WSReturnObject{
|
||||
* @WSValueName("name")
|
||||
* @WSValueName("name")
|
||||
* public String name;
|
||||
* @WSValueName("lastname")
|
||||
* @WSValueName("lastname")
|
||||
* public String lastname;
|
||||
*
|
||||
* public TestObject(String n, String l){
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ public class BEncodedParser {
|
|||
* Returns the representation of the data in the BEncoded string
|
||||
*
|
||||
* @param data is the data to be decoded
|
||||
* @return
|
||||
*/
|
||||
public static DataNode read(String data) throws ParseException {
|
||||
return decode_BEncoded(new MutableInt(), new StringBuilder(data));
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public class BloomFilter<T extends Serializable> implements Set<T>, Serializable
|
|||
}
|
||||
|
||||
/**
|
||||
* @return clears the filter
|
||||
* Clears the filter
|
||||
*/
|
||||
public void clear() {
|
||||
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
|
||||
*/
|
||||
public double falsePosetiveProbability(){
|
||||
public double falsePositiveProbability(){
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
//*********************************************************************
|
||||
//*********************************************************************
|
||||
public Object[] toArray() {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public class WizardActionHandler implements ActionListener, FocusListener, ListS
|
|||
|
||||
/**
|
||||
* Registers the state of the event source
|
||||
* @param e is the event
|
||||
* @param c is the event
|
||||
*/
|
||||
public void registerValue(Component c) {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class BloomFilterTest extends TestCase {
|
|||
falsePositives++;
|
||||
}
|
||||
}
|
||||
double expectedFP = bf.falsePosetiveProbability();
|
||||
double expectedFP = bf.falsePositiveProbability();
|
||||
double actualFP = (double) falsePositives / (double) addCount;
|
||||
System.out.println("Got " + falsePositives
|
||||
+ " false positives out of " + addCount + " added items, rate = "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue