@Test public void testNicknames() { BrwsrCtx c = Contexts.newBuilder().register(Technology.class, this, 1).build(); People people = Models.bind(new People(), c).applyBindings(); people.getNicknames().add("One"); people.getNicknames().add("Two"); PropertyBinding pb = bindings.get("nicknames"); assertNotNull(pb, "Binding for info found"); Object real = pb.getValue(); assertTrue(real instanceof Object[], "It is an array: " + real); Object[] arr = (Object[])real; assertEquals(arr.length, 2, "Length two"); assertEquals(arr[0], "One", "Text should be in the model"); assertEquals(arr[1], "Two", "2nd text in the model"); }
@Override public boolean add(T e) { prepareChange(); boolean ret = super.add(e); notifyChange(); return ret; }
JSONList extends SimpleList<T> { @Override public boolean add(T e) { prepareChange(); boolean ret = super.add(e); notifyChange(); return ret; } }
JSONList extends SimpleList<T> { @Override public boolean add(T e) { prepareChange(); boolean ret = super.add(e); notifyChange(); return ret; } JSONList(Proto proto, String name, int changeIndex, String... deps); }
JSONList extends SimpleList<T> { @Override public boolean add(T e) { prepareChange(); boolean ret = super.add(e); notifyChange(); return ret; } JSONList(Proto proto, String name, int changeIndex, String... deps); void init(Object values); static void init(Collection<T> to, Object values); @Override boolean add(T e); @Override boolean addAll(Collection<? extends T> c); @Override boolean addAll(int index, Collection<? extends T> c); void fastReplace(Collection<? extends T> c); @Override boolean remove(Object o); @Override void clear(); @Override boolean removeAll(Collection<?> c); void sort(Comparator<? super T> c); @Override boolean retainAll(Collection<?> c); @Override T set(int index, T element); @Override void add(int index, T element); @Override T remove(int index); @Override String toString(); @Override JSONList clone(); }
JSONList extends SimpleList<T> { @Override public boolean add(T e) { prepareChange(); boolean ret = super.add(e); notifyChange(); return ret; } JSONList(Proto proto, String name, int changeIndex, String... deps); void init(Object values); static void init(Collection<T> to, Object values); @Override boolean add(T e); @Override boolean addAll(Collection<? extends T> c); @Override boolean addAll(int index, Collection<? extends T> c); void fastReplace(Collection<? extends T> c); @Override boolean remove(Object o); @Override void clear(); @Override boolean removeAll(Collection<?> c); void sort(Comparator<? super T> c); @Override boolean retainAll(Collection<?> c); @Override T set(int index, T element); @Override void add(int index, T element); @Override T remove(int index); @Override String toString(); @Override JSONList clone();  }