--- a/src/main/scala/SPARQL.scala Thu Feb 11 09:52:33 2010 -0500
+++ b/src/main/scala/SPARQL.scala Sun Feb 14 07:46:50 2010 -0500
@@ -112,6 +112,12 @@
case class TriplesBlock(triplepatterns:List[TriplePattern]) extends GraphPattern {
override def toString = "{\n " + (triplepatterns.toList.map(s => s.toString.replace("\n", "\n ")).mkString(".\n ")) + "\n}"
+ override def equals (other:Any):Boolean = other match {
+ case that:TriplesBlock => (that canEqual this) && triplepatterns.toSet == that.triplepatterns.toSet
+ case _ => false
+ }
+ override def canEqual(other : Any) : Boolean = other.isInstanceOf[TriplesBlock]
+ override def hashCode:Int = 41*triplepatterns.toSet.hashCode
}
case class TableConjunction(gps:List[GraphPattern]) extends GraphPattern {
assert (!(gps exists (x => { x match { case TableConjunction(_) => true case _ => false } })))