Examples of subList()


Examples of java.util.List.subList()

            // We start at an offset of 1 because the entire column
            // list is generally implicitly indexed by the fact that
            // it's a primary key.
            for (int i = 1; i < size; i++)
            {
                addIndex(new Index(this, pk.subList(i, size)));
            }
        }
        catch (EngineException e)
        {
            log.error(e, e);
View Full Code Here

Examples of java.util.List.subList()

    public List read (Kryo kryo, Input input, Class<List> type) {
      List list = (List)kryo.readClassAndObject(input);
      int fromIndex = input.readInt();
      int count = input.readInt();
      return list.subList(fromIndex, fromIndex + count);
    }
  }

  static public class ArraySubListSerializer extends Serializer<List> {
    private Field parentField, offsetField, sizeField;
View Full Code Here

Examples of java.util.List.subList()

    public List read (Kryo kryo, Input input, Class<List> type) {
      List list = (List)kryo.readClassAndObject(input);
      int offset = input.readInt();
      int size = input.readInt();
      return list.subList(offset, offset + size);
    }
  }
}
View Full Code Here

Examples of java.util.List.subList()

    public Preference getNode(String path) {
      List components = Arrays.asList((path.split("/")));
      Preference child;
      if (components.isEmpty()) return this;
      if ((child=getAttribute((String)components.get(0)))==null) return null;
      return child.getNode(components.subList(1, components.size()));
    }
   
    /**
     * Gets the Preference (node) at a specified path in the tree
     * @param components A List of Strings, an ordered set of nodes specifying the path
View Full Code Here

Examples of java.util.Vector.subList()

    new Support_ListTest("", tv).runTest();

    tv = new Vector(200);
    for (int i = -50; i < 150; i++)
      tv.addElement(new Integer(i));
    new Support_ListTest("", tv.subList(50, 150)).runTest();

    Vector v = new Vector();
    assertEquals("Vector creation failed", 0, v.size());
    assertEquals("Wrong capacity", 10, v.capacity());
  }
View Full Code Here

Examples of miscellaneous.CSVList.subList()

  public Dim(String csvString)
  {
    CSVList csv = new CSVList(csvString);
    this.dimName = csv.get(0);
    this.dimValues = new Vector<String>();
    this.dimValues.addAll(csv.subList(1, csv.size()));
    this.updateDimValueSet();
  }
 
  public Dim(String name, int max)
  {
View Full Code Here

Examples of net.minecraft.nbt.NBTTagList.subList()

                    tickets = orderedLoadingCallback.ticketsLoaded(ImmutableList.copyOf(tickets), world, maxTicketLength);
                }
                if (tickets.size() > maxTicketLength)
                {
                    FMLLog.warning("The mod %s has too many open chunkloading tickets %d. Excess will be dropped", modId, tickets.size());
                    tickets.subList(maxTicketLength, tickets.size()).clear();
                }
                ForgeChunkManager.tickets.get(world).putAll(modId, tickets);
                loadingCallback.ticketsLoaded(ImmutableList.copyOf(tickets), world);
            }
            for (String modId : playerLoadedTickets.keySet())
View Full Code Here

Examples of net.sf.json.JSONArray.subList()

    Map<String, String> payload = message.getPayload();
    //key is run status
    for (String key : payload.keySet()) {
      //each map value is a JSONArray string
      JSONArray a = JSONArray.fromObject(payload.get(key));
      List<JSONObject> all = a.subList(0, a.size());
      //for (JSONObject o : (Iterable<JSONObject>)a) {
      for (List<JSONObject> chunk : NotificationUtils.chunkList(all, splitterBatchSize)) {
        Map<String, String> runMap = new HashMap<String, String>();
        JSONArray aa = new JSONArray();
        for (JSONObject o : chunk) {
View Full Code Here

Examples of org.apache.commons.collections.primitives.ByteList.subList()

        assertListNotModifiable(makeUnmodifiableByteList());
    }

    public final void testSublistNotModifiable() throws Exception {
        ByteList list = makeUnmodifiableByteList();
        assertListNotModifiable(list.subList(0,list.size()-2));
    }
   
    public final void testIteratorNotModifiable() throws Exception {
        ByteList list = makeUnmodifiableByteList();
        assertIteratorNotModifiable(list.iterator());
View Full Code Here

Examples of org.apache.commons.collections.primitives.CharList.subList()

        assertListNotModifiable(makeUnmodifiableCharList());
    }

    public final void testSublistNotModifiable() throws Exception {
        CharList list = makeUnmodifiableCharList();
        assertListNotModifiable(list.subList(0,list.size()-2));
    }
   
    public final void testIteratorNotModifiable() throws Exception {
        CharList list = makeUnmodifiableCharList();
        assertIteratorNotModifiable(list.iterator());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.