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
Merge branch 'develop' into merged_2_11_2_0_to_2_12
[jalview.git]
/
src
/
jalview
/
datamodel
/
features
/
FeatureStore.java
diff --git
a/src/jalview/datamodel/features/FeatureStore.java
b/src/jalview/datamodel/features/FeatureStore.java
index
7651016
..
eb5688c
100644
(file)
--- a/
src/jalview/datamodel/features/FeatureStore.java
+++ b/
src/jalview/datamodel/features/FeatureStore.java
@@
-182,18
+182,17
@@
public class FeatureStore
{
if (feature.isNonPositional())
{
{
if (feature.isNonPositional())
{
- return nonPositionalFeatures == null ? false : nonPositionalFeatures
- .contains(feature);
+ return nonPositionalFeatures == null ? false
+ : nonPositionalFeatures.contains(feature);
}
if (feature.isContactFeature())
{
}
if (feature.isContactFeature())
{
- return contactFeatureStarts == null ? false : listContains(
- contactFeatureStarts, feature);
+ return contactFeatureStarts == null ? false
+ : listContains(contactFeatureStarts, feature);
}
}
- return features == null ? false : features
- .contains(feature);
+ return features == null ? false : features.contains(feature);
}
/**
}
/**
@@
-280,13
+279,12
@@
public class FeatureStore
true, Compare.GE, feature.getBegin());
contactFeatureStarts.add(insertPosition, feature);
true, Compare.GE, feature.getBegin());
contactFeatureStarts.add(insertPosition, feature);
-
/*
* insert into list sorted by end (second contact position):
* binary search the sorted list to find the insertion point
*/
/*
* insert into list sorted by end (second contact position):
* binary search the sorted list to find the insertion point
*/
- insertPosition = BinarySearcher.findFirst(contactFeatureEnds,
- false, Compare.GE, feature.getEnd());
+ insertPosition = BinarySearcher.findFirst(contactFeatureEnds, false,
+ Compare.GE, feature.getEnd());
contactFeatureEnds.add(insertPosition, feature);
return true;
contactFeatureEnds.add(insertPosition, feature);
return true;
@@
-395,16
+393,16
@@
public class FeatureStore
* find the first contact feature (if any)
* whose end point is not before the target range
*/
* find the first contact feature (if any)
* whose end point is not before the target range
*/
- int index = BinarySearcher.findFirst(contactFeatureEnds,
- false, Compare.GE, (int) from);
+ int index = BinarySearcher.findFirst(contactFeatureEnds, false,
+ Compare.GE, (int) from);
while (index < contactFeatureEnds.size())
{
SequenceFeature sf = contactFeatureEnds.get(index);
if (!sf.isContactFeature())
{
while (index < contactFeatureEnds.size())
{
SequenceFeature sf = contactFeatureEnds.get(index);
if (!sf.isContactFeature())
{
- System.err.println("Error! non-contact feature type "
- + sf.getType() + " in contact features list");
+ System.err.println("Error! non-contact feature type " + sf.getType()
+ + " in contact features list");
index++;
continue;
}
index++;
continue;
}
@@
-448,8
+446,8
@@
public class FeatureStore
protected void findContactStartOverlaps(long from, long to,
List<SequenceFeature> result)
{
protected void findContactStartOverlaps(long from, long to,
List<SequenceFeature> result)
{
- int index = BinarySearcher.findFirst(contactFeatureStarts,
- true, Compare.GE, (int) from);
+ int index = BinarySearcher.findFirst(contactFeatureStarts, true,
+ Compare.GE, (int) from);
while (index < contactFeatureStarts.size())
{
while (index < contactFeatureStarts.size())
{
@@
-675,10
+673,9
@@
public class FeatureStore
public boolean isEmpty()
{
boolean hasFeatures = (contactFeatureStarts != null
public boolean isEmpty()
{
boolean hasFeatures = (contactFeatureStarts != null
- && !contactFeatureStarts
- .isEmpty())
- || (nonPositionalFeatures != null && !nonPositionalFeatures
- .isEmpty())
+ && !contactFeatureStarts.isEmpty())
+ || (nonPositionalFeatures != null
+ && !nonPositionalFeatures.isEmpty())
|| (features != null && features.size() > 0);
return !hasFeatures;
|| (features != null && features.size() > 0);
return !hasFeatures;
@@
-700,9
+697,9
@@
public class FeatureStore
}
else
{
}
else
{
- return nonPositionalFeatureGroups == null ? Collections
- .<String> emptySet() : Collections
- .unmodifiableSet(nonPositionalFeatureGroups);
+ return nonPositionalFeatureGroups == null
+ ? Collections.<String> emptySet()
+ : Collections.unmodifiableSet(nonPositionalFeatureGroups);
}
}
}
}
@@
-717,8
+714,8
@@
public class FeatureStore
{
if (!positional)
{
{
if (!positional)
{
- return nonPositionalFeatures == null ? 0 : nonPositionalFeatures
- .size();
+ return nonPositionalFeatures == null ? 0
+ : nonPositionalFeatures.size();
}
int size = 0;
}
int size = 0;
@@
-802,8
+799,8
@@
public class FeatureStore
for (SequenceFeature sf : sfs)
{
String featureGroup = sf.getFeatureGroup();
for (SequenceFeature sf : sfs)
{
String featureGroup = sf.getFeatureGroup();
- if (group == null && featureGroup == null || group != null
- && group.equals(featureGroup))
+ if (group == null && featureGroup == null
+ || group != null && group.equals(featureGroup))
{
result.add(sf);
}
{
result.add(sf);
}