@ Override public Set < Entry < String , Object > > entrySet ( ) { if ( entries == null ) { entries = new HashSet <> ( ) ; Iterator < String > iterator = getAttributeNames ( ) ; while ( iterator . hasNext ( ) ) { final String key = iterator . next ( ) ; final Object value = getAttribute ( key ) ; entries . add ( new Entry < String , Object > ( ) { @ Override public boolean equals ( final Object obj ) { if ( obj == null ) { return false ; } if ( this . getClass ( ) != obj . getClass ( ) ) { return false ; } Entry entry = ( Entry ) obj ; return ( ( key == null ) ? ( entry . getKey ( ) == null ) : key . equals ( entry . getKey ( ) ) ) && ( ( value == null ) ? ( entry . getValue ( ) == null ) : value . equals ( entry . getValue ( ) ) ) ; } @ Override public int hashCode ( ) { return ( ( key == null ) ? 0 : key . hashCode ( ) ) ^ ( ( value == null ) ? 0 : value . hashCode ( ) ) ; } @ Override public String getKey ( ) { return key ; } @ Override public Object getValue ( ) { return value ; } @ Override public Object setValue ( final Object obj ) { setAttribute ( key , obj ) ; return value ; } } ) ; } } return entries ; }
Returns a Set of attributes from the http request .