public Discharge newInstance(Object described)
{
List l = (List) described;
Discharge o = new Discharge();
if(l.isEmpty())
{
throw new DecodeException("The txn-id field cannot be omitted");
}
switch(2 - l.size())
{
case 0:
o.setFail( (Boolean) l.get( 1 ) );
case 1:
o.setTxnId( (Binary) l.get( 0 ) );
}
return o;
}