public boolean contains ( Attribute attr ) throws NamingException { if ( attr == null ) { return false ; // protect } Attribute recAttr = getAttributes ( ) . get ( attr . getID ( ) ) ; if ( recAttr == null ) { return false ; } NamingEnumeration ne = attr . getAll ( ) ; while ( ne . hasMore ( ) ) { if ( ! recAttr . contains ( ne . next ( ) ) ) { return false ; } } return true ; }
Return true if the record contains all of the values of the given attribute .