APISonar


java.util.ArrayList.length

> java > util > ArrayList > length
java APIs util APIs ArrayList APIs length APIs

Example 1
private ArrayList<Integer> pile [] ; 

    public int hash(int h) {
    	

        return h % pile.length;
        /*      
    	int k=h;
    	k ^= (k >>> 20) ^ (k >>> 12);
        k= k ^ (k >>> 7) ^ (k >>> 4);

        return k & (pile.length-1);
         */
    }
Example 2
protected void writeSavableArrayListArray(ArrayList[] array)
            throws IOException {
        if (array == null) {
            write(NULL_OBJECT);
            return;
        }
        write(array.length);
        for (ArrayList bs : array) {
            writeSavableArrayList(bs);
        }
    }
Example 3
private ArrayList types = new ArrayList();

    void add(MimeType[] types) {
        if (types == null) { return; }
        for (int i=0; i<types.length; i++) {
            add(types[i]);
        }
    }
Example 4
private ArrayList iterators = null;

    public CollatingIterator(final Comparator comp, final Iterator[] iterators) {
        this(comp, iterators.length);
        for (int i = 0; i < iterators.length; i++) {
            addIterator(iterators[i]);
        }
    }
Example 5
private final ArrayList<String> uriList = new ArrayList<String>();

    public final void setUriList(String[] uriList) {
        this.uriList.clear();
        int n = uriList.length;
        for (int i = 0; i < n; i++) {
            this.uriList.add(uriList[i]);
        }
        this.initUriList();
    }
Example 6
public ArrayList<String> strings = new ArrayList<>();

  public String getActionText() {
    StringBuffer res = new StringBuffer();
    String[] strings = (String[]) actionStrings
        .toArray(new String[actionStrings.size()]);
    Arrays.sort(strings);
    for (int i = 0; i < strings.length; i++) {
      if (i > 0)
        res.append('\n');
      res.append(strings[i]);
    }
    return res.toString();
  }
Example 7
private static ArrayList<String> str = new ArrayList<String>();

    public java.lang.String concat(java.lang.String str){
        char[] n = new char[length() + str.length()];
        System.arraycopy(value, offset, n, 0, count);
        System.arraycopy(str.value, str.offset, n, count, str.count);
        return new String(n); 
    }
Example 8
public static String[][] extractNes(Parse parse) {
		// initialize dynamic arrays
		ArrayList[] nes = new ArrayList[finders.length];
		for (int i = 0; i < nes.length; i++) nes[i] = new ArrayList();
		
		// depth-first search on the parse tree
		extractNesRec(parse, nes);
		
		// copy to static arrays
		String[][] results = new String[finders.length][];
		for (int i = 0; i < nes.length; i++)
			results[i] = (String[]) nes[i].toArray(new String[nes[i].size()]);
		
		return results;
	}
Example 9
ArrayList<Pipe> pipes;

	public BranchingPipe (Pipe[] pipes)
	{
		this.pipes = new ArrayList<Pipe> (pipes.length);
		for (int i = 0; i < pipes.length; i++)
			this.pipes.add (pipes[i]);
	}
Example 10
private final ArrayList<Item>[] mItems;

	public int getItemCount() {

		int count = 0;

		//noinspection ForLoopReplaceableByForEach
		for(int i = 0; i < mItems.length; i++) {
			count += getGroupUnhiddenCount(i);
		}

		return count;
	}
Example 11
private final ArrayList<MyThread>[] waitingThreads = new ArrayList[runningThreads.length];

	public synchronized int[] waitingThreads() {
		int[] result = new int[waitingThreads.length];
		for(int i = 0; i < result.length; i++)
			result[i] = waitingThreads[i].size();
		return result;
	}
Example 12
private ArrayList           steps;

    public int[] getStepIndexes(StepMeta steps[])
    {
        int retval[] = new int[steps.length];

        for (int i = 0; i < steps.length; i++)
            retval[i] = indexOfStep(steps[i]);

        return retval;
    }
Example 13
private final ArrayList<SoftReference<T>> elements;

    public SimpleRotatingSoftQueue(T[] elements) {
        if (elements == null || elements.length == 0) {
            throw new IllegalArgumentException("elements array must not be null or zero-length");
        }
        this.QUEUE_SIZE = elements.length;
        this.elements = new ArrayList<SoftReference<T>>(this.QUEUE_SIZE);

        for (T element : elements) {
            SoftReference<T> elementItem = new SoftReference<T>(element);
            this.elements.add(elementItem);
        }
    }
Example 14
private ArrayList           notes;

    public int[] getNoteIndexes(NotePadMeta notes[])
    {
        int retval[] = new int[notes.length];

        for (int i = 0; i < notes.length; i++)
            retval[i] = indexOfNote(notes[i]);

        return retval;
    }
Example 15
protected ArrayList<String> repositories = new ArrayList<String>();

    public StandardClassLoader(URL repositories[]) {

        super(repositories);
        this.parent = getParent();
        this.system = getSystemClassLoader();
        securityManager = System.getSecurityManager();
        if (repositories != null) {
            for (int i = 0; i < repositories.length; i++) {
                addRepositoryInternal(repositories[i].toString());
            }
        }
    }
Example 16
ArrayList entries;

    public Alphabet (Object[] entries) {
        this (entries.length);
        for (Object entry : entries)
            this.lookupIndex(entry);
    }
Example 17
private final ArrayList<Frame> expectedResponse, actualResponse;

    public H2StreamResult(int streamId, Frame[] expectedResponse) {
        this(streamId);
        for (int i = 0; i < expectedResponse.length; i++) {
            addExpectedResponse(expectedResponse[i]);
        }

    }
Example 18
private   ArrayList      tables;

	public int[] getTableIndexes(TableMeta tables[])
	{
		int retval[] = new int[tables.length];
		
		for (int i=0;i<tables.length;i++) retval[i]=indexOfTable(tables[i]);
		
		return retval;
	}
Example 19
protected ArrayList<String> args;

    public TransactionRequest setArgs(byte[]... args) {

        ArrayList<byte[]> argBytes = new ArrayList<>(args.length);

        argBytes.addAll(Arrays.asList(args));

        this.argBytes = argBytes;
        return this;
    }
Example 20
private final ArrayList<String> stems;

    public StemList(String... stems) {
        super();
        this.stems = new ArrayList<>(Math.max(stems.length, 3));
        for (String word : stems) {
            add(word);
        }
    }
Example 21
private ArrayList<XMenuItemPeer> items;

    final void setItemsFont( Font font ) {
        XMenuItemPeer[] items = copyItems();
        int itemCnt = items.length;
        for (int i = 0; i < itemCnt; i++) {
            items[i].setFont(font);
        }
    }
Example 22
private ArrayList<PrunableMixtureComponent[]> topComponents;

    private void insertTopComponent(PrunableMixtureComponent[] topComponents, PrunableMixtureComponent component) {
        int i;
        for (i = 0; i < topComponents.length - 1; i++) {
            if (component.getPartialScore() < topComponents[i].getPartialScore()) {
                topComponents[i - 1] = component;
                return;
            }
            topComponents[i] = topComponents[i + 1];
        }
        if (component.getPartialScore() < topComponents[topComponents.length - 1].getPartialScore())
            topComponents[topComponents.length - 2] = component;
        else
            topComponents[topComponents.length - 1] = component;
    }
Example 23
private ArrayList<XMenuItemPeer> items;

    XMenuItemPeer getItemFromPoint(Point pt) {
        XMenuItemPeer[] items = getMappingData().getItems();
        int cnt = items.length;
        for (int i = 0; i < cnt; i++) {
            if (items[i].getBounds().contains(pt)) {
                return items[i];
            }
        }
        return null;
    }
Example 24
private ArrayList<EventHandler> handlers = new ArrayList<>();

   public void createServerSASL(ServerSASL[] handlers) {
      this.serverSasl = transport.sasl();
      saslHandlers = new HashMap<>();
      String[] names = new String[handlers.length];
      int count = 0;
      for (ServerSASL handler : handlers) {
         saslHandlers.put(handler.getName(), handler);
         names[count++] = handler.getName();
      }
      this.serverSasl.server();
      serverSasl.setMechanisms(names);

   }
Example 25
private final ArrayList<Identifier> directiveNames = new ArrayList<>();

    private DeclareStatement(int start, int end, Identifier[] directiveNames, Expression[] directiveValues, Statement action) {
        super(start, end);

        if (directiveNames == null || directiveValues == null || directiveNames.length != directiveValues.length) {
            throw new IllegalArgumentException();
        }
        this.directiveNames.addAll(Arrays.asList(directiveNames));
        this.directiveValues.addAll(Arrays.asList(directiveValues));
        this.body = action;
    }