예제 #1
0
 public GeoHashQuery joinWith(GeoHashQuery other)
 {
     if (other.isPrefix(this))
     {
         return(new GeoHashQuery(this.startValue, other.endValue));
     }
     else if (this.isPrefix(other))
     {
         return(new GeoHashQuery(other.startValue, this.endValue));
     }
     else if (this.isSuperQuery(other))
     {
         return(other);
     }
     else if (other.isSuperQuery(this))
     {
         return(this);
     }
     else
     {
         throw new Exception("Can't join these 2 queries: " + this + ", " + other);
     }
 }
예제 #2
0
 public bool canJoinWith(GeoHashQuery other)
 {
     return(this.isPrefix(other) || other.isPrefix(this) || this.isSuperQuery(other) || other.isSuperQuery(this));
 }