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-1016) noted position where race condition occurs
[jalview.git]
/
src
/
org
/
biojava
/
dasobert
/
feature
/
FeatureMapComparator.java
diff --git
a/src/org/biojava/dasobert/feature/FeatureMapComparator.java
b/src/org/biojava/dasobert/feature/FeatureMapComparator.java
index
8aa747b
..
aa38981
100644
(file)
--- a/
src/org/biojava/dasobert/feature/FeatureMapComparator.java
+++ b/
src/org/biojava/dasobert/feature/FeatureMapComparator.java
@@
-22,48
+22,47
@@
*
*/
*
*/
+package org.biojava.dasobert.feature;
-package org.biojava.dasobert.feature ;
+import java.util.Comparator;
+import java.util.Map;
-import java.util.Comparator ;
-import java.util.Map ;
-
-/** a comparator to sort Features if they are still in a Map ( sorts by type )
+/**
+ * a comparator to sort Features if they are still in a Map ( sorts by type )
+ *
* @author Andreas Prlic
*/
* @author Andreas Prlic
*/
-public class FeatureMapComparator
- implements Comparator
+public class FeatureMapComparator implements Comparator
{
{
- public FeatureMapComparator() {
- }
+ public FeatureMapComparator()
+ {
+ }
- public int compare(Object a, Object b) {
- Map x = (Map) a;
- Map y = (Map) b;
+ public int compare(Object a, Object b)
+ {
+ Map x = (Map) a;
+ Map y = (Map) b;
- String typea = (String)x.get("TYPE");
- String typeb = (String)y.get("TYPE");
-
-
+ String typea = (String) x.get("TYPE");
+ String typeb = (String) y.get("TYPE");
- if ( isSecstruc(typea) && isSecstruc(typeb)) {
- return 0 ;
- }
- return typea.compareTo(typeb);
+ if (isSecstruc(typea) && isSecstruc(typeb))
+ {
+ return 0;
}
}
+ return typea.compareTo(typeb);
+ }
- public boolean isSecstruc(String type) {
- if ( type.equals("HELIX")
- ||
- type.equals("STRAND")
- ||
- type.equals("TURN")
- ) {
- return true ;
- }
- return false ;
+ public boolean isSecstruc(String type)
+ {
+ if (type.equals("HELIX") || type.equals("STRAND")
+ || type.equals("TURN"))
+ {
+ return true;
}
}
+ return false;
+ }
}
}