package Ġcom . d 3 . btc . withdraw al . transaction . consensus Ċ Ċ import Ġcom . d 3 . btc . withdraw al . transaction . Withdraw al Details Ċ Ċ /** Ċ Ġ* ĠStorage Ġof Ġwithdraw al Ġconsensus Ġdata Ċ Ġ*/ Ċ object ĠCons ensus Data Storage Ġ{ ĊĊĠĠĠ Ġ// ĠCollection Ġthat Ġstores Ġconsensus Ġdata ĊĠĠĠ Ġprivate Ġval Ġconsensus Data Ġ= ĠHashMap < String , ĠWith draw al Details Consensus >() ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠAdds Ġnew Ġwithdraw al Ġconsensus Ġdata Ġif Ġpossible ĊĠĠĠĠ Ġ* Ġ@ param Ġwithdraw al Hash Ġ- Ġhash Ġof Ġwithdraw al Ġthat Ġneeds Ġconsensus Ġdata ĊĠĠĠĠ Ġ* Ġ@ param Ġwithdraw al Consensus Ġ- Ġwithdraw al Ġconsensus Ġdata ĊĠĠĠĠ Ġ* Ġ@ return Ġtrue Ġif Ġdata Ġwas Ġadded Ġsuccessfully ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Synchron ized ĊĠĠĠ Ġfun Ġadd ( withdraw al Hash : ĠString , Ġwithdraw al Consensus : ĠWith draw al Consensus ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ(! consensus Data . containsKey ( withdraw al Hash )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġfalse ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġconsensus Data [ withdraw al Hash ] !!. consensus . add ( withdraw al Consensus ) ĊĠĠĠĠĠĠĠ Ġreturn Ġtrue ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠClear s Ġconsensus Ġdata Ġby Ġwithdraw al Ġhash ĊĠĠĠĠ Ġ* Ġ@ param Ġwithdraw al Hash Ġ- Ġhash Ġof Ġwithdraw al Ġwhich Ġconsensus Ġwill Ġbe Ġremoved ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Synchron ized ĊĠĠĠ Ġfun Ġclear ( withdraw al Hash : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġconsensus Data . remove ( withdraw al Hash ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠReturns Ġconsensus Ġdata Ġby Ġwithdraw al Ġhash ĊĠĠĠĠ Ġ* Ġ@ param Ġwithdraw al Hash Ġ- Ġhash Ġof Ġwithdraw al ĊĠĠĠĠ Ġ* Ġ@ return Ġconsensus Ġdata ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Synchron ized ĊĠĠĠ Ġfun Ġget ( withdraw al Hash : ĠString ) Ġ= Ġconsensus Data [ withdraw al Hash ] ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠCreates Ġconsensus Ġdata Ġstorage Ġfor Ġwithdraw al ĊĠĠĠĠ Ġ* Ġ@ param Ġwithdraw al Hash Ġ- Ġhash Ġof Ġwithdraw al Ġthat Ġneeds Ġconsensus Ġdata ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Synchron ized ĊĠĠĠ Ġfun Ġcreate ( withdraw al Details : ĠWith draw al Details ) Ġ{ ĊĠĠĠĠĠĠĠ Ġconsensus Data [ withdraw al Details . iro ha Friendly HashCode ()] Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠWith draw al Details Consensus ( withdraw al Details , ĠArrayList ()) ĊĠĠĠ Ġ} Ċ } Ċ Ċ /** Ċ Ġ* ĠData Ġclass Ġthat Ġholds Ġinformation Ġabout Ġwithdraw al Ġdetails Ġand Ġconsensus Ċ Ġ*/ Ċ data Ġclass ĠWith draw al Details Consensus ( ĊĠĠĠ Ġval Ġwithdraw al Details : ĠWith draw al Details , ĊĠĠĠ Ġval Ġconsensus : ĠMutable List < Withdraw al Consensus > Ċ ) ĊĊ