private void putToCache ( final Element element , final Constraint object ) { String id = element . getAttributeValue ( XMLTags . ID ) ; if ( id != null && id . length ( ) > 0 ) { Constraint old = putToCache ( id , object ) ; if ( old != null ) { LOG . warn ( "The id=" + id + " for object of type=" + old . getClass ( ) . getName ( ) + " was already found. Please make sure this is ok and no mistake." ) ; } } }
If the element has an attribute with name id this attribute s value will be used as key to store the just generated object in a map . The object can in this case also be retrieved using this id .