package com.epam.ta.reportportal.database.entity.item;

import java.util.Arrays;
import java.util.Optional;

/**
 * @author Pavel Bortnik
 */
public enum RetryType {
	ROOT("ROOT"),
	RETRY("RETRY"),
	LAST("LAST");

	RetryType(String value) {
		this.value = value;
	}

	private String value;

	public static Optional<RetryType> fromString(String string) {
		return Optional.ofNullable(string)
				.flatMap(str -> Arrays.stream(values())
						.filter(it -> it.value.equals(str)).findAny());
	}

	public String getValue() {
		return value;
	}
}

@@ -359,56 +359,8 @@
 turn
- Optional.ofNullable(string)%0A%09%09%09%09.flatMap(str -%3E
  Arr
@@ -383,15 +383,8 @@
 s())
-%0A%09%09%09%09%09%09
 .fil
@@ -396,21 +396,26 @@
 t -%3E it.
-v
+getV
 alue
+()
 .equals(
@@ -417,16 +417,19 @@
 uals(str
+ing
 )).findA
@@ -432,17 +432,16 @@
 indAny()
-)
 ;%0A%09%7D%0A%0A%09p

fix from string