From FANG
|
01 packagepackage is used to name the directory or folder a class is in scg.ch14.gamestuff;
02
03 /**
04 * Represents a pair of items which a Critter will trade forfor is a looping structure for repeatedly executing a block of code. That is,
05 * given the "getsUUID" it will returnreturn means to provide the result of the method and/or cease execution of the method immediately the "givesUUID".
06 */
07 publicpublic is used to indicate unrestricted access (any other class can have access) classclass is a group of fields and methods used for making objects TradesFor {open braces start code blocks and must be matched with a close brace
08 privateprivate is used to restrict access to the current class only finalfinal means not changeable (often used for constants) String getsUUID;
09 privateprivate is used to restrict access to the current class only finalfinal means not changeable (often used for constants) String givesUUID;
10
11 /** get the UUID which is the receiving UUID */
12 publicpublic is used to indicate unrestricted access (any other class can have access) String getGetsUUID() {open braces start code blocks and must be matched with a close brace
13 returnreturn means to provide the result of the method and/or cease execution of the method immediately getsUUID;
14 }close braces end code blocks and must match an earlier open brace
15
16 /** get the UUID which is given back forfor is a looping structure for repeatedly executing a block of code the UUID */
17 publicpublic is used to indicate unrestricted access (any other class can have access) String getGivesUUID() {open braces start code blocks and must be matched with a close brace
18 returnreturn means to provide the result of the method and/or cease execution of the method immediately givesUUID;
19 }close braces end code blocks and must match an earlier open brace
20
21 /**
22 * Construct a newnew is used to create objects by calling the constructor {open braces start code blocks and must be matched with a close brace@link TradesFor}close braces end code blocks and must match an earlier open brace pair.
23 * @paramthis is the Javadoc tag for documenting the purpose of parameters getsUUID the UUID received
24 * @paramthis is the Javadoc tag for documenting the purpose of parameters givesUUID the UUID given
25 */
26 publicpublic is used to indicate unrestricted access (any other class can have access) TradesFor(String getsUUID, String givesUUID) {open braces start code blocks and must be matched with a close brace
27 super();
28 thisthis means the current object (the implicit parameter).getsUUID =this assignment operator makes the left side equal to the right side getsUUID;
29 thisthis means the current object (the implicit parameter).givesUUID =this assignment operator makes the left side equal to the right side givesUUID;
30 }close braces end code blocks and must match an earlier open brace
31 }close braces end code blocks and must match an earlier open brace
32
33 //Uploaded on Mon Mar 29 21:41:29 EDT 2010
|
Download/View scg/ch14/gamestuff/TradesFor.java