public final int last_common_layer(BrdItem p_other){
  int max_first_layer=Math.max(first_layer(),p_other.first_layer());
  int min_last_layer=Math.min(last_layer(),p_other.last_layer());
  if (max_first_layer > min_last_layer)   return -1;
  return min_last_layer;
}

public final int last_common_layer ( BrdItem p_other ) { int max_first_layer = Math . max ( first_layer ( ) , p_other . first_layer ( ) ) ; int min_last_layer = Math . min ( last_layer ( ) , p_other . last_layer ( ) ) ; if ( max_first_layer > min_last_layer ) return - 1 ; return min_last_layer ; }
returns the last layer , where both this item and p_other have a shape . returns - 1 , if such a layer does not exisr .
