package com.powerdata.openpa.psse;

import com.powerdata.openpa.tools.AbstractBaseObject;

public class PsseBaseObject extends AbstractBaseObject
{
	PsseBaseList<?> _plist;
	
	public PsseBaseObject(PsseBaseList<?> list, int ndx)
	{
		super(list, ndx);
		_plist = list;
	}

	public PsseModel getPsseModel() {return _plist.getPsseModel();}
}

@@ -166,16 +166,32 @@
 _plist;%0A
+%09int _hashcode;%0A
 %09%0A%09publi
@@ -283,74 +283,433 @@
 t;%0A%09
-%7D%0A%0A%09public PsseModel getPsseModel() %7Breturn _plist.getPsseModel();
+%09_hashcode = list.getClass().hashCode() + getClass().hashCode() + ndx;%0A%09%7D%0A%0A%09public PsseModel getPsseModel() %7Breturn _plist.getPsseModel();%7D%0A%09@Override%0A%09public int hashCode()%0A%09%7B%0A%09%09return _hashcode;%0A%09%7D%0A%0A%09@Override%0A%09public boolean equals(Object obj)%0A%09%7B%0A%09%09if (obj instanceof PsseBaseObject)%0A%09%09%7B%0A%09%09%09PsseBaseObject o = (PsseBaseObject)obj;%0A%09%09%09return _ndx == o._ndx && _plist.hashCode() == o._plist.hashCode();%0A%09%09%7D%0A%09%09return false;%0A%09
 %7D%0A%7D%0A

Make hashcode and equals work for power objects