001package com.fs.starfarer.api.campaign; 002 003 004public enum PersonImportance { 005 006 VERY_LOW("Very Low", 0f), 007 LOW("Low", 0.25f), 008 MEDIUM("Medium", 0.5f), 009 HIGH("High", 0.75f), 010 VERY_HIGH("Very High", 1f) 011 ; 012 013 014 private final String displayName; 015 private final float value; 016 private PersonImportance(String displayName, float value) { 017 this.displayName = displayName; 018 this.value = value; 019 } 020 public String getDisplayName() { 021 return displayName; 022 } 023 public float getValue() { 024 return value; 025 } 026 027 private static PersonImportance [] vals = values(); 028 public PersonImportance next() { 029 int index = this.ordinal() + 1; 030 if (index >= vals.length) index = vals.length - 1; 031 return vals[index]; 032 } 033 public PersonImportance prev() { 034 int index = this.ordinal() - 1; 035 if (index < 0) index = 0; 036 return vals[index]; 037 } 038 039}