mirror of
https://github.com/stleary/JSON-java.git
synced 2026-03-20 00:00:50 -04:00
Updates javadocs
This commit is contained in:
@@ -10,6 +10,10 @@ import java.io.StringReader;
|
||||
* generic number value
|
||||
*/
|
||||
public class GenericBean<T extends Number & Comparable<T>> implements MyBean {
|
||||
/**
|
||||
* @param genericValue
|
||||
* value to initiate with
|
||||
*/
|
||||
public GenericBean(T genericValue) {
|
||||
super();
|
||||
this.genericValue = genericValue;
|
||||
@@ -28,7 +32,10 @@ public class GenericBean<T extends Number & Comparable<T>> implements MyBean {
|
||||
return this.genericValue;
|
||||
}
|
||||
|
||||
/** sets the generic value */
|
||||
/**
|
||||
* @param genericValue
|
||||
* generic value to set
|
||||
*/
|
||||
public void setGenericValue(T genericValue) {
|
||||
this.genericSetCounter++;
|
||||
this.genericValue = genericValue;
|
||||
|
||||
@@ -11,17 +11,24 @@ public class GenericBeanInt extends GenericBean<Integer> {
|
||||
/** */
|
||||
final char a = 'A';
|
||||
|
||||
/** return the a */
|
||||
/** @return the a */
|
||||
public char getA() {
|
||||
return a;
|
||||
}
|
||||
|
||||
/** return false. should not be beanable */
|
||||
|
||||
/**
|
||||
* Should not be beanable
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
public boolean getable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** */
|
||||
/**
|
||||
* @param genericValue
|
||||
* the value to initiate with.
|
||||
*/
|
||||
public GenericBeanInt(Integer genericValue) {
|
||||
super(genericValue);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,12 @@ public final class Singleton {
|
||||
return someInt;
|
||||
}
|
||||
|
||||
/** sets someInt */
|
||||
/**
|
||||
* sets someInt.
|
||||
*
|
||||
* @param someInt
|
||||
* the someInt to set
|
||||
*/
|
||||
public void setSomeInt(int someInt) {
|
||||
this.someInt = someInt;
|
||||
}
|
||||
@@ -46,7 +51,12 @@ public final class Singleton {
|
||||
return someString;
|
||||
}
|
||||
|
||||
/** sets someString */
|
||||
/**
|
||||
* sets someString.
|
||||
*
|
||||
* @param someString
|
||||
* the someString to set
|
||||
*/
|
||||
public void setSomeString(String someString) {
|
||||
this.someString = someString;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@ package org.json.junit.data;
|
||||
*
|
||||
*/
|
||||
public enum SingletonEnum {
|
||||
/**
|
||||
* the singleton instance.
|
||||
*/
|
||||
INSTANCE;
|
||||
/** */
|
||||
private int someInt;
|
||||
@@ -32,7 +35,12 @@ public enum SingletonEnum {
|
||||
return someInt;
|
||||
}
|
||||
|
||||
/** sets someInt */
|
||||
/**
|
||||
* sets someInt.
|
||||
*
|
||||
* @param someInt
|
||||
* the someInt to set
|
||||
*/
|
||||
public void setSomeInt(int someInt) {
|
||||
this.someInt = someInt;
|
||||
}
|
||||
@@ -42,7 +50,12 @@ public enum SingletonEnum {
|
||||
return someString;
|
||||
}
|
||||
|
||||
/** sets someString */
|
||||
/**
|
||||
* sets someString.
|
||||
*
|
||||
* @param someString
|
||||
* the someString to set
|
||||
*/
|
||||
public void setSomeString(String someString) {
|
||||
this.someString = someString;
|
||||
}
|
||||
|
||||
@@ -14,31 +14,53 @@ public class WeirdList {
|
||||
/** */
|
||||
private final List<Integer> list = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @param vals
|
||||
*/
|
||||
public WeirdList(Integer... vals) {
|
||||
this.list.addAll(Arrays.asList(vals));
|
||||
}
|
||||
|
||||
/** gets a copy of the list */
|
||||
/**
|
||||
* @return a copy of the list
|
||||
*/
|
||||
public List<Integer> get() {
|
||||
return new ArrayList<>(this.list);
|
||||
}
|
||||
|
||||
/** gets a copy of the list */
|
||||
/**
|
||||
* @return a copy of the list
|
||||
*/
|
||||
public List<Integer> getALL() {
|
||||
return new ArrayList<>(this.list);
|
||||
}
|
||||
|
||||
/** get an index */
|
||||
/**
|
||||
* get a value at an index.
|
||||
*
|
||||
* @param i
|
||||
* index to get
|
||||
* @return the value at the index
|
||||
*/
|
||||
public Integer get(int i) {
|
||||
return this.list.get(i);
|
||||
}
|
||||
|
||||
/** get an index */
|
||||
/**
|
||||
* get a value at an index.
|
||||
*
|
||||
* @param i
|
||||
* index to get
|
||||
* @return the value at the index
|
||||
*/
|
||||
public int getInt(int i) {
|
||||
return this.list.get(i);
|
||||
}
|
||||
|
||||
/** adds a new value to the end of the list */
|
||||
/**
|
||||
* @param value
|
||||
* new value to add to the end of the list
|
||||
*/
|
||||
public void add(Integer value) {
|
||||
this.list.add(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user