001package com.ctre.phoenix.platform.can; 002 003/** 004 * Keeps track of cache state 005 */ 006public enum AutocacheState { 007 /** 008 * Disabled cache 009 */ 010 Disabled(0), 011 /** 012 * Enabled cache 013 */ 014 Enabled(1); 015 016 /** 017 * Get AutocacheState of specified value 018 * @param value Value of autocacheState 019 * @return AutocacheState of specified value 020 */ 021 public static AutocacheState valueOf(int value) { 022 for (AutocacheState frame : values()) { 023 if (frame.value == value) { 024 return frame; 025 } 026 } 027 return null; 028 } 029 030 /** 031 * Value of AutocacheState 032 */ 033 public final int value; 034 035 /** 036 * Create AutocacheState of initValue 037 * @param initValue Value of AutocacheState 038 */ 039 AutocacheState(int initValue) { 040 this.value = initValue; 041 } 042}