diff options
author | Rocky Madden <git@rockymadden.com> | 2013-03-08 10:19:13 -0700 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2013-03-08 10:19:13 -0700 |
commit | dc24003f7b66d27e521340681c5ca6e8f5325a11 (patch) | |
tree | c4974507d5b9b08eba4711842edf631571c59ce1 /core/source | |
parent | 5ffb06bcdcee9aa3b86d5fb699ec449e4aa1fbfc (diff) | |
download | stringmetric-dc24003f7b66d27e521340681c5ca6e8f5325a11.tar.gz stringmetric-dc24003f7b66d27e521340681c5ca6e8f5325a11.tar.bz2 stringmetric-dc24003f7b66d27e521340681c5ca6e8f5325a11.zip |
Removed startsWith methods.
Diffstat (limited to 'core/source')
-rwxr-xr-x | core/source/core/scala/com/rockymadden/stringmetric/phonetic/Alphabet.scala | 6 | ||||
-rwxr-xr-x | core/source/test/scala/com/rockymadden/stringmetric/phonetic/AlphabetSpec.scala | 51 |
2 files changed, 0 insertions, 57 deletions
diff --git a/core/source/core/scala/com/rockymadden/stringmetric/phonetic/Alphabet.scala b/core/source/core/scala/com/rockymadden/stringmetric/phonetic/Alphabet.scala index 089b01b..7c52c7b 100755 --- a/core/source/core/scala/com/rockymadden/stringmetric/phonetic/Alphabet.scala +++ b/core/source/core/scala/com/rockymadden/stringmetric/phonetic/Alphabet.scala @@ -12,12 +12,6 @@ object Alphabet { charArray.length > 0 && charArray.takeWhile(Chars.contains(_)).length == charArray.length def isSuperset(string: String): Boolean = isSuperset(string.toCharArray) - - def startsWith(char: Char): Boolean = Chars.contains(char) - - def startsWith(charArray: Array[Char]): Boolean = charArray.length > 0 && Chars.contains(charArray.head) - - def startsWith(string: String): Boolean = startsWith(string.toCharArray) } case object LowercaseConsonant extends AlphabetSet { diff --git a/core/source/test/scala/com/rockymadden/stringmetric/phonetic/AlphabetSpec.scala b/core/source/test/scala/com/rockymadden/stringmetric/phonetic/AlphabetSpec.scala index 8074ca8..3287d45 100755 --- a/core/source/test/scala/com/rockymadden/stringmetric/phonetic/AlphabetSpec.scala +++ b/core/source/test/scala/com/rockymadden/stringmetric/phonetic/AlphabetSpec.scala @@ -93,56 +93,5 @@ final class AlphabetSpec extends ScalaTest { } } } - "an overloaded startsWith method which accepts Array[Char]" when passed { - "empty argument" should returns { - "false" in { - Alpha startsWith Array.empty[Char] should be (false) - } - } - "non-alphabet argument" should returns { - "false" in { - Alpha startsWith "1abc".toCharArray should be (false) - } - } - "alphabet argument" should returns { - "true" in { - Alpha startsWith "abc".toCharArray should be (true) - } - } - } - "an overloaded startsWith method which accepts Char" when passed { - "empty argument" should returns { - "false" in { - Alpha startsWith '0' should be (false) - } - } - "non-alphabet argument" should returns { - "false" in { - Alpha startsWith '1' should be (false) - } - } - "alphabet argument" should returns { - "true" in { - Alpha startsWith 'a' should be (true) - } - } - } - "an overloaded startsWith method which accepts String" when passed { - "empty argument" should returns { - "false" in { - Alpha startsWith "" should be (false) - } - } - "non-alphabet argument" should returns { - "false" in { - Alpha startsWith "1abc" should be (false) - } - } - "alphabet argument" should returns { - "true" in { - Alpha startsWith "abc" should be (true) - } - } - } } } |