Example #1
0
 /**
  * Modified version of {@link List#add(int, Object)} which fills null in the empty spaces if index
  * > size() instead of throwing IndexOutOfBoundsException.
  */
 @Override
 public void add(int index, Object element) {
   int size = list.size();
   while (index > size++) {
     list.add(null);
   }
   list.add(JsonValueBuilder.initFromObject(element));
 }
Example #2
0
 @Override
 public boolean containsAll(Collection<?> c) {
   for (Object o : c) {
     if (list.contains(JsonValueBuilder.initFromObject(o)) == false) {
       return false;
     }
   }
   return true;
 }
Example #3
0
 @Override
 public boolean contains(Object o) {
   return list.contains(JsonValueBuilder.initFromObject(o));
 }
Example #4
0
 @Override
 public int lastIndexOf(Object o) {
   return list.lastIndexOf(JsonValueBuilder.initFromObject(o));
 }