Exemplo n.º 1
0
 public static <T> CQueryCollection<T> from(final Iterable<T> iterable) {
   return iterable == null
       ? CQuery.<T>empty()
       : new CQueryCollection<T>() {
         @Override
         public Iterator<T> iterator() {
           return iterable.iterator();
         }
       };
 }
Exemplo n.º 2
0
 public static <T> CQueryCollection<T> from(final Set<T> collection) {
   return collection == null
       ? CQuery.<T>empty()
       : new CollectionWrapper<T>(collection) {
         @Override
         public CQueryCollection<T> distinct() {
           return this;
         }
       };
 }
Exemplo n.º 3
0
 public static CQueryCollection<Integer> from(final int... array) {
   return array == null ? CQuery.<Integer>empty() : new IntArrayWrapper(array);
 }
Exemplo n.º 4
0
 public static CQueryCollection<Boolean> from(final boolean... array) {
   return array == null ? CQuery.<Boolean>empty() : new BooleanArrayWrapper(array);
 }
Exemplo n.º 5
0
 public static <T> CQueryCollection<T> from(final T... array) {
   return array == null ? CQuery.<T>empty() : new ArrayWrapper<T>(array);
 }
Exemplo n.º 6
0
 public static <T> CQueryCollection<T> from(final Collection<T> collection) {
   return collection == null ? CQuery.<T>empty() : new CollectionWrapper<T>(collection);
 }