]> Softwares of Agnibho - anagram.git/blobdiff - com/agnibho/code/anagram/IsAnagram.java
Rewritten in C++
[anagram.git] / com / agnibho / code / anagram / IsAnagram.java
diff --git a/com/agnibho/code/anagram/IsAnagram.java b/com/agnibho/code/anagram/IsAnagram.java
deleted file mode 100644 (file)
index f7c11b6..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-    Anagram- Find anagrams of a word
-    Copyright (C) 2013  Agnibho Mondal
-    
-    This file is part of Anagram.
-
-    Anagram is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    Anagram is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with Anagram.  If not, see <http://www.gnu.org/licenses/>.
-*/
-package com.agnibho.code.anagram;
-
-/**
- *
- * @author SPARK
- */
-public class IsAnagram {
-    private char[] input;
-    private char[] reference;
-    private boolean checked;
-    
-    IsAnagram(){
-    }
-    
-    public boolean check(String in, String ref){
-        in=in.replaceAll("\\s", "");
-        ref=ref.replaceAll("\\s", "");
-        input=in.toLowerCase().toCharArray();
-        reference=ref.toLowerCase().toCharArray();
-        java.util.Arrays.sort(input);
-        java.util.Arrays.sort(reference);
-        if(java.util.Arrays.equals(input, reference)) checked=true;
-        else checked=false;
-        return checked;
-    }
-}