@Test public void testGetEntry() { Options options = new Options(); options.add(Integer.valueOf("123"), "text", true); OptionEntry entry = options.getEntry(Integer.valueOf("123")); assertNotNull(entry); assertEquals("text", entry.getText()); assertEquals(Integer.valueOf(123), entry.getValue()); }
public OptionEntry getEntry(Object value) { if (value instanceof Entry<?,?>) value = ((Entry<?,?>) value).getKey(); if (value instanceof OptionEntry) value = ((OptionEntry) value).getValue(); for (OptionEntry oe : list) { if (oe.valueEquals(value)) return oe; } return null; }
Options extends AbstractSet<OptionEntry> implements Cloneable, Serializable { public OptionEntry getEntry(Object value) { if (value instanceof Entry<?,?>) value = ((Entry<?,?>) value).getKey(); if (value instanceof OptionEntry) value = ((OptionEntry) value).getValue(); for (OptionEntry oe : list) { if (oe.valueEquals(value)) return oe; } return null; } }
Options extends AbstractSet<OptionEntry> implements Cloneable, Serializable { public OptionEntry getEntry(Object value) { if (value instanceof Entry<?,?>) value = ((Entry<?,?>) value).getKey(); if (value instanceof OptionEntry) value = ((OptionEntry) value).getValue(); for (OptionEntry oe : list) { if (oe.valueEquals(value)) return oe; } return null; } Options();  Options(Options other);  Options(OptionEntry [] entries);  Options(Class<?> enumType); }
Options extends AbstractSet<OptionEntry> implements Cloneable, Serializable { public OptionEntry getEntry(Object value) { if (value instanceof Entry<?,?>) value = ((Entry<?,?>) value).getKey(); if (value instanceof OptionEntry) value = ((OptionEntry) value).getValue(); for (OptionEntry oe : list) { if (oe.valueEquals(value)) return oe; } return null; } Options();  Options(Options other);  Options(OptionEntry [] entries);  Options(Class<?> enumType); @Override Options clone(); OptionEntry getEntry(Object value); String get(Object value); boolean isActive(Object value); Object getValueAt(int i); String getTextAt(int i); Set<Object> getValues(); void set(Object value, String text, boolean active, InsertPos pos); void set(Object value, String text, InsertPos pos); void set(Object value, String text); void add(Object value, String text, boolean active); @Override boolean add(OptionEntry option); @Override void clear(); @Override boolean contains(Object value); boolean containsNull(); boolean exists(Object value); @Override boolean isEmpty(); @Override Iterator<OptionEntry> iterator(); @Override boolean remove(Object value); @Override int size(); @Override Object[] toArray(); @Override String toString(); void addXml(Element element, long flags); }
Options extends AbstractSet<OptionEntry> implements Cloneable, Serializable { public OptionEntry getEntry(Object value) { if (value instanceof Entry<?,?>) value = ((Entry<?,?>) value).getKey(); if (value instanceof OptionEntry) value = ((OptionEntry) value).getValue(); for (OptionEntry oe : list) { if (oe.valueEquals(value)) return oe; } return null; } Options();  Options(Options other);  Options(OptionEntry [] entries);  Options(Class<?> enumType); @Override Options clone(); OptionEntry getEntry(Object value); String get(Object value); boolean isActive(Object value); Object getValueAt(int i); String getTextAt(int i); Set<Object> getValues(); void set(Object value, String text, boolean active, InsertPos pos); void set(Object value, String text, InsertPos pos); void set(Object value, String text); void add(Object value, String text, boolean active); @Override boolean add(OptionEntry option); @Override void clear(); @Override boolean contains(Object value); boolean containsNull(); boolean exists(Object value); @Override boolean isEmpty(); @Override Iterator<OptionEntry> iterator(); @Override boolean remove(Object value); @Override int size(); @Override Object[] toArray(); @Override String toString(); void addXml(Element element, long flags);  }