// Path: Common/src/main/java/de/maxikg/osuapi/utils/Valuable.java
// public interface Valuable<T> {
// 
//     /**
//      * Returns the representative and unique value.
//      *
//      * @return The value
//      */
//     T getValue();
// }
// 
// Path: Common/src/main/java/de/maxikg/osuapi/utils/ValuableUtils.java
// @NoArgsConstructor(access = AccessLevel.PRIVATE)
// public class ValuableUtils {
// 
//     /**
//      * Identifies a enum value based on value returned by {@link Valuable#getValue()}.
//      *
//      * @param enumClass The class of the enumeration type.
//      * @param value The value to search for (it can be null).
//      * @param <T> The value type.
//      * @param <U> The enum entry type.
//      * @return A {@link Optional} value. Absent if no enum entry matches given value.
//      */
//     public static <T, U extends Enum<U> & Valuable<T>> Optional<U> getByValue(Class<U> enumClass, T value) {
//         for (U enumerationValue : enumClass.getEnumConstants()) {
//             T currentValue = enumerationValue.getValue();
// 
//             if ((currentValue == null && value == null) || (value != null && value.equals(currentValue)))
//                 return Optional.fromNullable(enumerationValue);
//         }
// 
//         return Optional.absent();
//     }
// }


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.google.common.base.Optional;
import de.maxikg.osuapi.utils.Valuable;
import de.maxikg.osuapi.utils.ValuableUtils;
import lombok.RequiredArgsConstructor;
package de.maxikg.osuapi.model;


/**
 * @author maxikg
 * @since 1.0
 */
@RequiredArgsConstructor
public enum Team implements Valuable<Integer> {

    UNSUPPORTED(0),
    BLUE(1),
    RED(2);

// Path: Common/src/main/java/de/maxikg/osuapi/utils/Valuable.java
// public interface Valuable<T> {
// 
//     /**
//      * Returns the representative and unique value.
//      *
//      * @return The value
//      */
//     T getValue();
// }
// 
// Path: Common/src/main/java/de/maxikg/osuapi/utils/ValuableUtils.java
// @NoArgsConstructor(access = AccessLevel.PRIVATE)
// public class ValuableUtils {
// 
//     /**
//      * Identifies a enum value based on value returned by {@link Valuable#getValue()}.
//      *
//      * @param enumClass The class of the enumeration type.
//      * @param value The value to search for (it can be null).
//      * @param <T> The value type.
//      * @param <U> The enum entry type.
//      * @return A {@link Optional} value. Absent if no enum entry matches given value.
//      */
//     public static <T, U extends Enum<U> & Valuable<T>> Optional<U> getByValue(Class<U> enumClass, T value) {
//         for (U enumerationValue : enumClass.getEnumConstants()) {
//             T currentValue = enumerationValue.getValue();
// 
//             if ((currentValue == null && value == null) || (value != null && value.equals(currentValue)))
//                 return Optional.fromNullable(enumerationValue);
//         }
// 
//         return Optional.absent();
//     }
// }


// Path: Common/src/main/java/de/maxikg/osuapi/model/Team.java
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.google.common.base.Optional;
import de.maxikg.osuapi.utils.Valuable;
import de.maxikg.osuapi.utils.ValuableUtils;
import lombok.RequiredArgsConstructor;

package de.maxikg.osuapi.model;


/**
 * @author maxikg
 * @since 1.0
 */
@RequiredArgsConstructor
public enum Team implements Valuable<Integer> {

    UNSUPPORTED(0),
    BLUE(1),
    RED(2);

    private final Integer value;