/******************************************************************************
 * Copyright (c) 2009 - 2015 IBM Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *****************************************************************************/
package data.little;
public class Value implements Comparable {
  final int myVal;
  final int herVal;
	
  public Value(int myVal, int herVal){
    this.myVal = myVal;
    this.herVal = herVal;
  }
	
  public boolean equals(Object o){
    return (o instanceof Value) &&
	   myVal == ((Value)o).myVal &&
	   herVal == ((Value)o).herVal;
  }
	
  public int hashCode(){
    return myVal + (5*herVal); 
  }

  public int compareTo(Object o){
    if (myVal != ((Value)o).myVal) {
      return myVal - ((Value)o).myVal;
    } else {
      return herVal - ((Value)o).herVal;
    }
  }
}

@@ -582,16 +582,23 @@
 mparable
+%3CValue%3E
  %7B%0A  fin
@@ -955,22 +955,21 @@
 mpareTo(
-Object
+Value
  o)%7B%0A   
@@ -982,26 +982,17 @@
 yVal != 
-((Value)o)
+o
 .myVal) 
@@ -1014,26 +1014,17 @@
 myVal - 
-((Value)o)
+o
 .myVal;%0A
@@ -1058,26 +1058,17 @@
 erVal - 
-((Value)o)
+o
 .herVal;

use Comparable properly