Ejemplo n.º 1
0
 public override bool Equals(object obj)
 {
     if (this == obj)
     {
         return(true);
     }
     if (!(obj is SemanticContext.AND))
     {
         return(false);
     }
     SemanticContext.AND other = (SemanticContext.AND)obj;
     return(Arrays.Equals(this.opnds, other.opnds));
 }
Ejemplo n.º 2
0
 public static SemanticContext And(SemanticContext a, SemanticContext b)
 {
     if (a == null || a == None)
     {
         return(b);
     }
     if (b == null || b == None)
     {
         return(a);
     }
     SemanticContext.AND result = new SemanticContext.AND(a, b);
     if (result.opnds.Length == 1)
     {
         return(result.opnds[0]);
     }
     return(result);
 }