01: package net.sf.jmoney.model2;
02:
03: import org.eclipse.core.runtime.Assert;
04:
05: public class ListKey<E extends ExtendableObject> {
06: private IObjectKey parentKey;
07: private ListPropertyAccessor<E> listProperty;
08:
09: public ListKey(IObjectKey parentKey,
10: ListPropertyAccessor<E> listProperty) {
11: this .parentKey = parentKey;
12: this .listProperty = listProperty;
13: }
14:
15: public IObjectKey getParentKey() {
16: return parentKey;
17: }
18:
19: public ListPropertyAccessor<E> getListPropertyAccessor() {
20: return listProperty;
21: }
22:
23: @Override
24: public boolean equals(Object other) {
25: Assert.isTrue(other instanceof ListKey);
26: ListKey otherListKey = (ListKey) other;
27: return parentKey.equals(otherListKey.parentKey)
28: && listProperty == otherListKey.listProperty;
29: }
30: }
|