public Key withAttribute ( String attributeName , AttributeValue value ) { if ( this . attributes == null ) { this . attributes = new HashMap < String , AttributeValue > ( ) ; } attributes . put ( attributeName , value ) ; return this ; }
The method set attribute name and attribute value with input parameters for a key . Returns a reference to this object so that method calls can be chained together .