private boolean isParent(ItemData data, ItemData parent)
   {
      String id1 = data.getParentIdentifier();
      String id2 = parent.getIdentifier();
      if (id1 == id2) // NOSONAR 
         return true;
      if (id1 == null && id2 != null)
         return false;
      return id1 != null && id1.equals(id2);
   }
private boolean isParent ( ItemData data , ItemData parent ) { String id1 = data . getParentIdentifier ( ) ; String id2 = parent . getIdentifier ( ) ; if ( id1 == id2 ) return true ; if ( id1 == null && id2 != null ) return false ; return id1 != null && id1 . equals ( id2 ) ; }
Check if item <b>parent</b> is parent item of item <b>data</b>.

@param data - Possible child ItemData.
@param parent - Possible parent ItemData.
@return True if parent of both ItemData the same.