summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2006-11-01 13:11:39 +0000
committerBurak Emir <emir@epfl.ch>2006-11-01 13:11:39 +0000
commit82ee25df5d42dbace00c202cb967d93249be5e87 (patch)
treec1819a64bb1145d2d8f70defac3767440e23ecaf
parent1c1e6d0fd8d994184c052e00dd7158867f143f48 (diff)
downloadscala-82ee25df5d42dbace00c202cb967d93249be5e87.tar.gz
scala-82ee25df5d42dbace00c202cb967d93249be5e87.tar.bz2
scala-82ee25df5d42dbace00c202cb967d93249be5e87.zip
useless stuff
-rw-r--r--src/compiler/scala/tools/nsc/matching/Npair.scala60
-rw-r--r--src/compiler/scala/tools/nsc/matching/StateSetComparator.scala34
2 files changed, 0 insertions, 94 deletions
diff --git a/src/compiler/scala/tools/nsc/matching/Npair.scala b/src/compiler/scala/tools/nsc/matching/Npair.scala
deleted file mode 100644
index b6d87cb270..0000000000
--- a/src/compiler/scala/tools/nsc/matching/Npair.scala
+++ /dev/null
@@ -1,60 +0,0 @@
-/* NSC -- new Scala compiler
- * Copyright 2005-2006 LAMP/EPFL
- * @author Burak Emir
- */
-// $Id$
-
-package scala.tools.nsc.matching
-
-import java.util.{HashMap, TreeSet}
-
-/** cartesian
- */
-
-/** Int x TreeSet[ Int ]
- */
-case class Npair(nstate: Integer, nset: TreeSet) {
-
- override def equals(that: Any): Boolean = this match {
- case Npair(nstate, nset) =>
- that match {
- case Npair(_nstate, _nset) =>
- (nstate == _nstate) && (nset == _nset)
- case _ =>
- false
- }
- case _ =>
- false
- }
-
- override def toString(): String = this match {
- case Npair(nstate, nset) =>
- //Integer dstate = (Integer) indexMap.get(nset);
- "<n" + nstate.toString() + " in " + nset /*+" = d"+dstate*/ + ">";
- case _ =>
- null
- }
-
- def toString(indexMap: HashMap): String = {
- //assert indexMap != null
- this match {
- case Npair(nstate, nset) =>
- //assert nstate != null
- val dstate = indexMap.get( nset ).asInstanceOf[Integer]
- "<n" + nstate.toString() + " in " + nset + " = d" + dstate + ">"
- case _ =>
- null
- }
- }
-
-}
-
-class NpairComparator extends StateSetComparator {
- override def compare(o1: Any, o2: Any): Int = o1 match {
- case Npair(nstate, nset) => o2 match {
- case Npair(_nstate, _nset) =>
- val res = nstate.compareTo(_nstate)
- if (res != 0) res else super.compare(nset, _nset)
- }
- }
-}
diff --git a/src/compiler/scala/tools/nsc/matching/StateSetComparator.scala b/src/compiler/scala/tools/nsc/matching/StateSetComparator.scala
deleted file mode 100644
index 4caf8f9fa6..0000000000
--- a/src/compiler/scala/tools/nsc/matching/StateSetComparator.scala
+++ /dev/null
@@ -1,34 +0,0 @@
-/* NSC -- new Scala compiler
- * Copyright 2005-2006 LAMP/EPFL
- * @author Burak Emir
- */
-// $Id$
-
-package scala.tools.nsc.matching
-
-import java.util.{Comparator, TreeSet}
-
-class StateSetComparator extends Comparator {
-
- // use lexicographic order
- def compare(o1: Any, o2: Any): Int = {
- val it1 = o1.asInstanceOf[TreeSet].iterator()
- val it2 = o2.asInstanceOf[TreeSet].iterator()
- while (it1.hasNext()) {
- while (it2.hasNext()) {
- if (!it1.hasNext())
- return -1;
-
- val i1 = it1.next().asInstanceOf[Integer].intValue()
- val i2 = it2.next().asInstanceOf[Integer].intValue()
- if (i1 < i2)
- return -1;
- else if (i1 > i2)
- return 1;
- }
- if (it1.hasNext())
- return 1;
- }
- if (it2.hasNext()) -1 else 0
- }
-}