1 package com.thoughtworks.someobjects; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 public class WithList { 7 8 public List things = new ArrayList(); 9 10 public boolean equals(Object o) { 11 if (this == o) return true; 12 if (!(o instanceof WithList)) return false; 13 14 final WithList withList = (WithList) o; 15 16 if (things != null ? !things.equals(withList.things) : withList.things != null) return false; 17 if (!things.getClass().equals(withList.things.getClass())) return false; 18 19 return true; 20 } 21 22 public int hashCode() { 23 return (things != null ? things.hashCode() : 0); 24 } 25 26 public String toString() { 27 return "WithList:" + things; 28 } 29 }

This page was automatically generated by Maven