
Untitled
By: a guest on
Jul 20th, 2012 | syntax:
None | size: 1.21 KB | hits: 15 | expires: Never
How to fix this warning?
/**
* ADT for persons which is completed which subclasses
* to creating actors with specific properties
*/
public class Person {
/**
* Name of the Person.
*/
public String name;
/**
* The World which this Person is associated with.
*/
public World world;
/**
* Tells where this Person is at the moment.
*/
public Place where;
/**
* The inventory, contains Things.
*/
public Collection<Thing> inventory;
/**
* Shows how the Person looks like
*/
public Image appearance;
/**
* Create Person named `name' in world `world'.
*
* @param world The world where the Person is created.
* @param name Name of the Person.
* @param app An image used to display the Person.
*/
public Person( World world, String name, Image app ) {
this.world = world;
this.name = name;
this.appearance = app;
where = world.defaultPlace();
where.enter( this );
inventory = Collections.synchronizedCollection( new LinkedList() );
}
List<Person> people = Collections.synchronizedList(new LinkedList<Person>());
inventory = Collections.synchronizedCollection( new LinkedList<Thing>());