All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arextest.schedule.model.CaseProviderEnum Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package com.arextest.schedule.model;

import java.util.HashMap;
import java.util.Map;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public enum CaseProviderEnum {
  ROLLING(0, "Rolling"),
  PINNED(1, "Pinned"),
  AUTO_PINNED(2, "AutoPinned");

  private final int code;
  private final String name;
  private static final Map codeToProviderMap = new HashMap<>();

  static {
    for (CaseProviderEnum provider : values()) {
      codeToProviderMap.put(provider.code, provider);
    }
  }

  public static CaseProviderEnum fromCode(int code) {
    return codeToProviderMap.get(code);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy