@Test public void toArray() throws Exception { CookieCollection cookies = new CookieCollection(cookie); Cookie[] array = cookies.toArray(); Assert.assertEquals(cookies.size(), array.length); Assert.assertEquals(cookie, array[0]); }
public Cookie []toArray() { Cookie []cookies=new Cookie[cookieMap.size()]; return toArray(cookies); }
CookieCollection implements Collection<Cookie> { public Cookie []toArray() { Cookie []cookies=new Cookie[cookieMap.size()]; return toArray(cookies); } }
CookieCollection implements Collection<Cookie> { public Cookie []toArray() { Cookie []cookies=new Cookie[cookieMap.size()]; return toArray(cookies); } CookieCollection();  CookieCollection(Cookie... cookies);  CookieCollection(Collection<? extends Cookie> cookies); }
CookieCollection implements Collection<Cookie> { public Cookie []toArray() { Cookie []cookies=new Cookie[cookieMap.size()]; return toArray(cookies); } CookieCollection();  CookieCollection(Cookie... cookies);  CookieCollection(Collection<? extends Cookie> cookies); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override Iterator<Cookie> iterator(); Cookie [] toArray(); @Override T[] toArray(T[] ts); @Override boolean add(Cookie cookie); @Override boolean remove(Object o); Cookie get(String name); @Override boolean containsAll(Collection<?> collection); @Override boolean addAll(Collection<? extends Cookie> collection); @Override boolean removeAll(Collection<?> collection); @Override boolean retainAll(Collection<?> collection); @Override void clear(); }
CookieCollection implements Collection<Cookie> { public Cookie []toArray() { Cookie []cookies=new Cookie[cookieMap.size()]; return toArray(cookies); } CookieCollection();  CookieCollection(Cookie... cookies);  CookieCollection(Collection<? extends Cookie> cookies); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override Iterator<Cookie> iterator(); Cookie [] toArray(); @Override T[] toArray(T[] ts); @Override boolean add(Cookie cookie); @Override boolean remove(Object o); Cookie get(String name); @Override boolean containsAll(Collection<?> collection); @Override boolean addAll(Collection<? extends Cookie> collection); @Override boolean removeAll(Collection<?> collection); @Override boolean retainAll(Collection<?> collection); @Override void clear();  }