/**
* the <code>bar</code> component doesn't do much of anything. it is just
* meant to demonstrate javadoc.
* <p>
*
* @version 2.4
* @author john zukowski
*/
public class bar {
/**
* a specific type of foo
*/
public static final int foo_type = 0;
/**
* another specific type of foo
*/
public static final int another_foo_type = 1;
/**
* the current foo type
*/
private int type;
/**
* constructs a bar
*/
public bar() {
type = foo_type;
}
/**
* returns current foo type
*
* @return current foo type
* @deprecated as of version 2.3, use {@link #getfoo() getfoo()}instead
*/
public int foo() {
return getfoo();
}
/**
* returns current foo type
*
* @return current foo type
* @since v2.3
*/
public int getfoo() {
return getfoo();
}
/**
* changes current foo type
*
* @param type
* new type of foo
* @throws illegalargumentexception
* when type invalid
*/
public void setfoo(int newvalue) {
if ((newvalue != foo_type) && (newvalue != another_foo_type)) {
throw new illegalargumentexception("bad type");
}
type = newvalue;
}
/**
* placeholder method for see tags
*
* @see bar#foo_type
* @see bar#getfoo()
* @see #getfoo()
* @see "my book"
* @see <a href="http://www.jguru.com">jguru </a>
*/
public void myvoid() {
}
}
* the <code>bar</code> component doesn't do much of anything. it is just
* meant to demonstrate javadoc.
* <p>
*
* @version 2.4
* @author john zukowski
*/
public class bar {
/**
* a specific type of foo
*/
public static final int foo_type = 0;
/**
* another specific type of foo
*/
public static final int another_foo_type = 1;
/**
* the current foo type
*/
private int type;
/**
* constructs a bar
*/
public bar() {
type = foo_type;
}
/**
* returns current foo type
*
* @return current foo type
* @deprecated as of version 2.3, use {@link #getfoo() getfoo()}instead
*/
public int foo() {
return getfoo();
}
/**
* returns current foo type
*
* @return current foo type
* @since v2.3
*/
public int getfoo() {
return getfoo();
}
/**
* changes current foo type
*
* @param type
* new type of foo
* @throws illegalargumentexception
* when type invalid
*/
public void setfoo(int newvalue) {
if ((newvalue != foo_type) && (newvalue != another_foo_type)) {
throw new illegalargumentexception("bad type");
}
type = newvalue;
}
/**
* placeholder method for see tags
*
* @see bar#foo_type
* @see bar#getfoo()
* @see #getfoo()
* @see "my book"
* @see <a href="http://www.jguru.com">jguru </a>
*/
public void myvoid() {
}
}
闽公网安备 35060202000074号