package org.mastodon.detection;

import java.util.Map;

/**
 * Specify whether intensity maxima or minima should be detected.
 */
public enum DetectionType
{
	MINIMA("bright blobs"),
	MAXIMA("dark blobs");

	private final String str;

	DetectionType( String str )
	{
		this.str = str;
	}

	@Override
	public String toString()
	{
		return str;
	}

	public static DetectionType getOrDefault( final String name, final DetectionType defaultDetectionType )
	{
		try
		{
			return DetectionType.valueOf( name );
		}
		catch ( final IllegalArgumentException | NullPointerException e )
		{
			return defaultDetectionType;
		}
	}
}

@@ -30,31 +30,8 @@
 n;%0A%0A
-import java.util.Map;%0A%0A
 /**%0A
@@ -220,16 +220,22 @@
 ionType(
+ final
  String 

Fix minor Eclipse warning.