Java Collections.checkedList Examples

Java Collections.checkedList - 2 examples found. These are the top rated real world Java examples of java.util.Collections.checkedList extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
 private List<ControlHoras> getListWithRestriction(Criterion res[], FetchMode mode) {
   List<ControlHoras> lista = null;
   Session session = HibernateUtil.getSessionFactory().openSession();
   // Obtener el control de Horas
   Criteria criteria =
       session
           .createCriteria(ControlHoras.class)
           .setFetchMode("horas", mode)
           .setFetchMode("estado", FetchMode.JOIN);
   for (Criterion crit : res) {
     criteria.add(crit);
   }
   lista = Collections.checkedList(criteria.list(), ControlHoras.class);
   session.close();
   return lista;
 }
Example #2
0
 static List newList() {
   List s = Collections.checkedList(new ArrayList(), Integer.class);
   if (!s.isEmpty()) fail("New instance non empty.");
   return s;
 }