FileDocCategorySizeDatePackage
Set2.javaAPI DocExample3348Mon Apr 06 18:10:26 BST 1998c08.newcollections

MyType

public class MyType extends Object implements Comparable

Fields Summary
private int
i
Constructors Summary
public MyType(int n)

 i = n; 
Methods Summary
public intcompareTo(java.lang.Object o)

    int i2 = ((MyType) o).i;
    return (i2 < i ? -1 : (i2 == i ? 0 : 1));
  
public booleanequals(java.lang.Object o)

    return 
      (o instanceof MyType) 
      && (i == ((MyType)o).i);
  
public inthashCode()

 return i; 
public java.lang.StringtoString()

 return i + " ";