FileDocCategorySizeDatePackage
Fruit-permit.javaAPI DocExample1511Fri Nov 03 11:01:48 GMT 2006None

Fruit

public class Fruit extends Object implements Comparable

Fields Summary
String
name
int
size
Constructors Summary
public Fruit(String name, int size)

	this.name = name; this.size = size;
    
Methods Summary
public intcompareTo(Fruit that)

	return
	    this.size < that.size ? - 1 :
	    this.size == that.size ? 0 : 1 ;
    
public booleanequals(java.lang.Object o)

	return (o instanceof Fruit &&
		name.equals(((Fruit)o).name) &&
		size == ((Fruit)o).size) ;
    
public java.lang.StringtoString()

	return this.name + "(" + size + ")";