Skip to content

Commit

Permalink
Remove unnecessary type repetitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed Oct 26, 2021
1 parent d1d32d4 commit e247260
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2010, 2019 Lablicate GmbH.
* Copyright (c) 2010, 2021 Lablicate GmbH.
*
* All rights reserved. This
* program and the accompanying materials are made available under the terms of
Expand Down Expand Up @@ -31,7 +31,8 @@ public abstract class AbstractMarkedIons implements IMarkedIons {
* @param ions
*/
protected AbstractMarkedIons(int[] ionsList) {
markedIons = new HashSet<IMarkedIon>();

markedIons = new HashSet<>();
if(ionsList != null) {
for(int ion : ionsList) {
markedIons.add(new MarkedIon(ion));
Expand All @@ -41,8 +42,7 @@ protected AbstractMarkedIons(int[] ionsList) {

protected AbstractMarkedIons(Collection<? extends Number> ionsList) {


markedIons = new HashSet<IMarkedIon>();
markedIons = new HashSet<>();
if(ionsList != null) {
for(Number ion : ionsList) {
markedIons.add(new MarkedIon(ion.intValue()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class AbstractMarkedWavelengths implements IMarkedWavelengths {

public AbstractMarkedWavelengths() {

markedWavelengths = new HashSet<IMarkedWavelength>();
markedWavelengths = new HashSet<>();
}

@Override
Expand Down Expand Up @@ -106,7 +106,7 @@ public <T> T[] toArray(T[] a) {
@Override
public Set<Double> getWavelengths() {

Set<Double> wavelengths = new HashSet<Double>();
Set<Double> wavelengths = new HashSet<>();
for(IMarkedWavelength markedWavelength : markedWavelengths) {
wavelengths.add(markedWavelength.getWavelength());
}
Expand Down

0 comments on commit e247260

Please sign in to comment.