diff options
author | Rocky Madden <git@rockymadden.com> | 2012-11-01 09:26:29 -0600 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2012-11-01 09:26:29 -0600 |
commit | 289212a263b92e44b676f34213ae641b9500a836 (patch) | |
tree | 3e579eb46b00c02f90eff9b19f68a7531d12ac01 /core | |
parent | 5aaa6b7ebd102a9c25554b96a38aa06b61193254 (diff) | |
download | stringmetric-289212a263b92e44b676f34213ae641b9500a836.tar.gz stringmetric-289212a263b92e44b676f34213ae641b9500a836.tar.bz2 stringmetric-289212a263b92e44b676f34213ae641b9500a836.zip |
Prefixed with Ascii, as it only handles for ASCII based spaces.
Diffstat (limited to 'core')
-rwxr-xr-x | core/source/core/scala/org/hashtree/stringmetric/AsciiSpaceStringFilter.scala (renamed from core/source/core/scala/org/hashtree/stringmetric/SpaceStringFilter.scala) | 4 | ||||
-rwxr-xr-x | core/source/test/scala/org/hashtree/stringmetric/AsciiSpaceStringFilterSpec.scala (renamed from core/source/test/scala/org/hashtree/stringmetric/SpaceStringFilterSpec.scala) | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/core/source/core/scala/org/hashtree/stringmetric/SpaceStringFilter.scala b/core/source/core/scala/org/hashtree/stringmetric/AsciiSpaceStringFilter.scala index 3c81eef..aaa21a5 100755 --- a/core/source/core/scala/org/hashtree/stringmetric/SpaceStringFilter.scala +++ b/core/source/core/scala/org/hashtree/stringmetric/AsciiSpaceStringFilter.scala @@ -1,7 +1,7 @@ package org.hashtree.stringmetric -/** A decorator [[org.hashtree.stringmetric.StringFilter]]. Ensures spaces do not matter. */ -trait SpaceStringFilter extends StringFilter { +/** A decorator [[org.hashtree.stringmetric.StringFilter]]. Ensures ASCII spaces do not matter. */ +trait AsciiSpaceStringFilter extends StringFilter { abstract override def filter(charArray: Array[Char]): Array[Char] = super.filter(charArray.filter(_ != ' ')) abstract override def filter(string: String): String = super.filter(string.replaceAllLiterally(" ", "")) diff --git a/core/source/test/scala/org/hashtree/stringmetric/SpaceStringFilterSpec.scala b/core/source/test/scala/org/hashtree/stringmetric/AsciiSpaceStringFilterSpec.scala index 9396461..2a46bf3 100755 --- a/core/source/test/scala/org/hashtree/stringmetric/SpaceStringFilterSpec.scala +++ b/core/source/test/scala/org/hashtree/stringmetric/AsciiSpaceStringFilterSpec.scala @@ -4,10 +4,10 @@ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) -final class SpaceStringFilterSpec extends ScalaTest { - private final val Filter = new StringFilterDelegate with SpaceStringFilter +final class AsciiSpaceStringFilterSpec extends ScalaTest { + private final val Filter = new StringFilterDelegate with AsciiSpaceStringFilter - "SpaceStringFilter" should provide { + "AsciiSpaceStringFilter" should provide { "overloaded filter method" when passed { "String with spaces" should returns { "String with spaces removed" in { |