예제 #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();
         }
       };
 }
예제 #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;
         }
       };
 }
예제 #3
0
 public static CQueryCollection<Integer> from(final int... array) {
   return array == null ? CQuery.<Integer>empty() : new IntArrayWrapper(array);
 }
예제 #4
0
 public static CQueryCollection<Boolean> from(final boolean... array) {
   return array == null ? CQuery.<Boolean>empty() : new BooleanArrayWrapper(array);
 }
예제 #5
0
 public static <T> CQueryCollection<T> from(final T... array) {
   return array == null ? CQuery.<T>empty() : new ArrayWrapper<T>(array);
 }
예제 #6
0
 public static <T> CQueryCollection<T> from(final Collection<T> collection) {
   return collection == null ? CQuery.<T>empty() : new CollectionWrapper<T>(collection);
 }