public List < Entity > weakEntities ( Entity e ) { final List < Entity > res = new ArrayList < Entity > ( ) ; for ( Entity entity : getEntities ( ) . values ( ) ) { if ( entity . getOwner ( ) != null && entity . getOwner ( ) . getEntityId ( ) . compareTo ( e . getId ( ) ) == 0 ) { res . add ( entity ) ; } } if ( res . isEmpty ( ) ) { return null ; } else { return res ; } }
Return the list of weak entities of the given entity .