@SuppressWarnings("unchecked")
  @Override public E get() {
    if (getPreferences().contains(getKey())) {
      return (E) enumValues[getPreferences().getInt(getKey(), 0)];
    } else {
      return getDefaultValue();
    }
  }
@ SuppressWarnings ( "unchecked" ) @ Override public E get ( ) { if ( getPreferences ( ) . contains ( getKey ( ) ) ) { return ( E ) enumValues [ getPreferences ( ) . getInt ( getKey ( ) , 0 ) ] ; } else { return getDefaultValue ( ) ; } }
Get the value the preference