I have the following class AccountWebappGridRow, which extends AccountGridRow:
public class AccountWebappGridRow<Accounts> extends AccountGridRow implements java.io.Serializable {
AccountGridRow contains has this field:
private Map<Integer, Integer> balances;
With public getters/setters:
public Map<Integer, Integer> getBalances() {
return balances;
}
public void setBalances(Map<Integer, Integer> balances) {
this.balances = balances;
}
Is there a way that I can somehow override/replace the inherited
private Map<Integer, Integer> balances;
in my AccountWebappGridRow...with this instead:
private Map<String, Integer> balances;
getBalances()
orsetBalances()
on anAccountGridRow
instance expects it to work with aMap<Integer, Integer>
. That code won't work if it gets aMap<String, Integer>
instead, because theAccountGridRow
happens to also be anAccountWebappGridRow
. – khelwood Jul 3 '17 at 12:14