Preference implements Formattable { @Override public void formatTo(Formatter formatter, int flags, int width, int precision) { formatter.format("(%s ^%s %s %c", id, attr, value, type.getIndicator()); if (type.isBinary()) { formatter.format(" %s", referent); } if (o_supported) formatter.format(" :O "); formatter.format(")\n"); } Preference(PreferenceType type, IdentifierImpl id, SymbolImpl attr, SymbolImpl value, SymbolImpl referent); static int countCandidates(Preference start); static Preference getCandidate(Preference start, int index); void setInstantiation(Instantiation inst); boolean isInTempMemory(); void preference_add_ref(); void preference_remove_ref(RecognitionMemory recMemory); @Override void formatTo(Formatter formatter, int flags, int width, int precision); @Override String toString(); static Preference find_clone_for_level(Preference p, int level); static void deallocate_preference(Preference pref, RecognitionMemory recMemory); boolean remove_preference_from_clones(RecognitionMemory recMemory); final PreferenceType type; final IdentifierImpl id; final SymbolImpl attr; final SymbolImpl value; public SymbolImpl referent; public boolean o_supported; public boolean on_goal_list; public int reference_count; public Slot slot; public Preference next; public Preference nextOfSlot; public Preference all_of_goal_next; public Preference all_of_goal_prev; public Preference next_clone; public Preference prev_clone; public Instantiation inst; public Preference inst_next; public Preference inst_prev; public Preference next_candidate; public Preference next_result; public int total_preferences_for_candidate; public double numeric_value; public boolean rl_contribution; public Set<Wme> wma_o_set; }
@Test public void testFormatTo() { }