git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2388 Comment typo
[jalview.git]
/
src
/
jalview
/
analysis
/
SequenceIdMatcher.java
diff --git
a/src/jalview/analysis/SequenceIdMatcher.java
b/src/jalview/analysis/SequenceIdMatcher.java
index
70defb0
..
c12de4e
100755
(executable)
--- a/
src/jalview/analysis/SequenceIdMatcher.java
+++ b/
src/jalview/analysis/SequenceIdMatcher.java
@@
-290,7
+290,7
@@
public class SequenceIdMatcher
{
if (s != null)
{
{
if (s != null)
{
- id = new String(s);
+ id = s.toLowerCase();
}
else
{
}
else
{
@@
-314,13
+314,13
@@
public class SequenceIdMatcher
}
if (s instanceof SeqIdName)
{
}
if (s instanceof SeqIdName)
{
- return this.equals(((SeqIdName) s).id);
+ return this.stringequals(((SeqIdName) s).id);
}
else
{
if (s instanceof String)
{
}
else
{
if (s instanceof String)
{
- return this.equals((String) s);
+ return this.stringequals(((String) s).toLowerCase());
}
}
}
}
@@
-344,7
+344,7
@@
public class SequenceIdMatcher
* @param s
* @return boolean
*/
* @param s
* @return boolean
*/
- public boolean equals(String s)
+ private boolean stringequals(String s)
{
if (id.length() > s.length())
{
{
if (id.length() > s.length())
{
@@
-357,5
+357,15
@@
public class SequenceIdMatcher
.indexOf(s.charAt(id.length())) > -1)) : false;
}
}
.indexOf(s.charAt(id.length())) > -1)) : false;
}
}
+
+ /**
+ * toString method returns the wrapped sequence id. For debugging purposes
+ * only, behaviour not guaranteed not to change.
+ */
+ @Override
+ public String toString()
+ {
+ return id;
+ }
}
}
}
}