private String get ( ChaincodeStub stub , List < String > args ) { if ( args . size ( ) != 1 ) { throw new RuntimeException ( "Incorrect arguments. Expecting a key" ) ; } String value = stub . getStringState ( args . get ( 0 ) ) ; if ( value == null || value . isEmpty ( ) ) { throw new RuntimeException ( "Asset not found: " + args . get ( 0 ) ) ; } return value ; }
get returns the value of the specified asset key