public OptionalPreferences getMatchingOptionalPref(OptionalPreferences toGet) { while (toGet != null) { if (GetType() == toGet.GetType()) { return(toGet); } toGet = toGet.nextDecPref; } return(null); }
public OptionalPreferences getOptionalPref(OptionalPreferences wantedPref) { OptionalPreferences temp = firstDecPref; while (temp != null) { if (temp.GetType() == wantedPref.GetType()) { return(temp); } temp = temp.nextDecPref; } return(null); }