public MonKeyImp(MonKeyItem keyItem, String units) { this.summaryLabel = (keyItem==null) ? "" : keyItem.toString(); this.units= (units==null) ? "" : units; this.details=keyItem.getDetails(); }
public MonKeyImp(MonKeyItem keyItem, String units) { String localSummaryLabel=keyItem.toString(); this.summaryLabel = (localSummaryLabel==null) ? "" : localSummaryLabel; this.units= (units==null) ? "" : units; this.detailLabel=keyItem.getDetailLabel(); }
public MyMonKey(MonKeyItem keyItem, String units) { super(); this.summaryLabel = (keyItem==null) ? "" : keyItem.toString();; this.units= (units==null) ? "" : units; this.details=keyItem.getDetails(); }
public String getDetailLabel() { if (detailLabel==null) { Iterator iter=keyMap.entrySet().iterator(); StringBuffer buff=new StringBuffer(); while(iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); Object value=entry.getValue(); if (value instanceof MonKeyItem) value=((MonKeyItem)value).getDetailLabel(); buff.append(value).append(", "); } return buff.toString(); } else return detailLabel; }
public Object getDetails() { if (details==null) { List list=new ArrayList(); Iterator iter=keyMap.entrySet().iterator(); //StringBuffer buff=new StringBuffer(); while(iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); Object value=entry.getValue(); if (value instanceof MonKeyItem) value=((MonKeyItem)value).getDetails(); list.add(value); } return list; } else return details; }