{
av.setFeaturesDisplayed(fdi = new FeaturesDisplayed());
}
- List<String> nft = new ArrayList<String>();
+ List<String> nft = new ArrayList<>();
for (String featureType : featureTypes)
{
if (!fdi.isRegistered(featureType))
renderOrder = neworder;
}
- protected Map<String, float[][]> minmax = new Hashtable<String, float[][]>();
+ protected Map<String, float[][]> minmax = new Hashtable<>();
public Map<String, float[][]> getMinMax()
{
* include features at the position provided their feature type is
* displayed, and feature group is null or marked for display
*/
- List<SequenceFeature> result = new ArrayList<SequenceFeature>();
+ List<SequenceFeature> result = new ArrayList<>();
if (!av.areFeaturesDisplayed() || getFeaturesDisplayed() == null)
{
return result;
}
FeaturesDisplayedI featuresDisplayed = av.getFeaturesDisplayed();
- Set<String> oldfeatures = new HashSet<String>();
+ Set<String> oldfeatures = new HashSet<>();
if (renderOrder != null)
{
for (int i = 0; i < renderOrder.length; i++)
}
AlignmentI alignment = av.getAlignment();
- List<String> allfeatures = new ArrayList<String>();
+ List<String> allfeatures = new ArrayList<>();
for (int i = 0; i < alignment.getHeight(); i++)
{
*/
if (minmax == null)
{
- minmax = new Hashtable<String, float[][]>();
+ minmax = new Hashtable<>();
}
synchronized (minmax)
{
*/
private void updateRenderOrder(List<String> allFeatures)
{
- List<String> allfeatures = new ArrayList<String>(allFeatures);
+ List<String> allfeatures = new ArrayList<>(allFeatures);
String[] oldRender = renderOrder;
renderOrder = new String[allfeatures.size()];
boolean initOrders = (featureOrder == null);
{
if (featureOrder == null)
{
- featureOrder = new Hashtable<String, Float>();
+ featureOrder = new Hashtable<>();
}
featureOrder.put(type, new Float(position));
return position;
* note visible feature ordering and colours before update
*/
List<String> visibleFeatures = getDisplayedFeatureTypes();
- Map<String, FeatureColourI> visibleColours = new HashMap<String, FeatureColourI>(
+ Map<String, FeatureColourI> visibleColours = new HashMap<>(
getFeatureColours());
FeaturesDisplayedI av_featuresdisplayed = null;
{
if (featureGroups != null)
{
- List<String> gp = new ArrayList<String>();
+ List<String> gp = new ArrayList<>();
for (String grp : featureGroups.keySet())
{
@Override
public Map<String, FeatureColourI> getDisplayedFeatureCols()
{
- Map<String, FeatureColourI> fcols = new Hashtable<String, FeatureColourI>();
+ Map<String, FeatureColourI> fcols = new Hashtable<>();
if (getViewport().getFeaturesDisplayed() == null)
{
return fcols;
public List<String> getDisplayedFeatureTypes()
{
List<String> typ = getRenderOrder();
- List<String> displayed = new ArrayList<String>();
+ List<String> displayed = new ArrayList<>();
FeaturesDisplayedI feature_disp = av.getFeaturesDisplayed();
if (feature_disp != null)
{
@Override
public List<String> getDisplayedFeatureGroups()
{
- List<String> _gps = new ArrayList<String>();
+ List<String> _gps = new ArrayList<>();
for (String gp : getFeatureGroups())
{
if (checkGroupVisibility(gp, false))
public List<SequenceFeature> findFeaturesAtResidue(SequenceI sequence,
int resNo)
{
- List<SequenceFeature> result = new ArrayList<SequenceFeature>();
+ List<SequenceFeature> result = new ArrayList<>();
if (!av.areFeaturesDisplayed() || getFeaturesDisplayed() == null)
{
return result;