public boolean deepEquals(Expression expr)
  {
  	if(!isSameClass(expr))
  		return false;
  		
  	UnionPattern up = (UnionPattern)expr;
  		
  	if(null != m_patterns)
  	{
  		int n = m_patterns.length;
  		if((null == up.m_patterns) || (up.m_patterns.length != n))
  			return false;
  			
  		for(int i = 0; i < n; i++)
  		{
  			if(!m_patterns[i].deepEquals(up.m_patterns[i]))
  				return false;
  		}
  	}
  	else if(up.m_patterns != null)
  		return false;
  		
  	return true;
  	
  }
public boolean deepEquals ( Expression expr ) { if ( ! isSameClass ( expr ) ) return false ; UnionPattern up = ( UnionPattern ) expr ; if ( null != m_patterns ) { int n = m_patterns . length ; if ( ( null == up . m_patterns ) || ( up . m_patterns . length != n ) ) return false ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! m_patterns [ i ] . deepEquals ( up . m_patterns [ i ] ) ) return false ; } } else if ( up . m_patterns != null ) return false ; return true ; }
@see Expression#deepEquals(Expression)