APISonar


java.util.ArrayList.size

> java > util > ArrayList > size
java APIs util APIs ArrayList APIs size APIs

Example 1
ArrayList<Pipe> pipes;

	public int size()
	{
		return pipes.size();
	}
Example 2
public byte[] obtainBuffer(int size) {
        synchronized (freeBuffers) {
            if (freeBuffers.containsKey(size)) {
                ArrayList<byte[]> b = freeBuffers.get(size);
                if (b.size() > 0) {
                    return b.remove(0);
                }
            }
        }

        return new byte[size];
    }
Example 3
private final ArrayList<E> executables;

	public void removeLastN(int n) {
		if ( n > 0 ) {
			int size = executables.size();
			for ( Executable e : executables.subList( size - n, size ) ) {
				if ( e.getPropertySpaces() != null && e.getPropertySpaces().length > 0 ) {
					// querySpaces could now be incorrect
					querySpaces = null;
					break;
				}
			}
			executables.subList( size - n, size ).clear();
		}
	}
Example 4
private void addRow(ArrayList<?> columnValues, int start) {
        int size = columnValues.size();
        if (size != columnCount) {
            throw new IllegalArgumentException("columnNames.length = "
                    + columnCount + ", columnValues.size() = " + size);
        }

        rowCount++;
        Object[] localData = data;
        for (int i = 0; i < size; i++) {
            localData[start + i] = columnValues.get(i);
        }
    }
Example 5
private ArrayList<Resource> files;

    public int size() {
        initFiles();
        return files.size();
    }
Example 6
private ArrayList _tunnels;

    public int size() { 
        synchronized (_tunnels) {
            return _tunnels.size();
        }
    }
Example 7
public ArrayList<String> data;

    public void clear() {
        int size = data.size();
        data.clear();
        notifyItemRangeRemoved(0, size);
    }
Example 8
private ArrayList<java.lang.String> outputColumnNames;

  public boolean pruneGroupingSetId() {
    return groupingSetPosition >= 0 &&
        outputColumnNames.size() != keys.size() + aggregators.size();
  }
Example 9
private final ArrayList<E> lifo = new ArrayList<E>();

	public E poll() {
		int size = lifo.size();
		if (size > 0) {
			E element = lifo.remove(size-1);
			set.remove(element);
			return element;
		} else {
			return null;
		}
	}
Example 10
ArrayList   registrants = new ArrayList();      // of Registrant

    public synchronized int
    size()
    {
        return registrants.size();
    }
Example 11
public String getTextAt(int line){
        ArrayList rowsV = getRowStrings();
        int size = rowsV.size();
        if(size == 0){
            return "";
        }
        if(line >= size){
            return (String)rowsV.get(size-1);        
        }            
        return (String)rowsV.get(line);
    }
Example 12
private final ArrayList mMessages = new ArrayList();

    public int size()
    {
        return mMessages.size();
    }
Example 13
public void setVert(ArrayList<Float> data){
        int size=data.size();
        ByteBuffer buffer=ByteBuffer.allocateDirect(size*4);
        buffer.order(ByteOrder.nativeOrder());
        vert=buffer.asFloatBuffer();
        for (int i=0;i<size;i++){
            vert.put(data.get(i));
        }
        vert.position(0);
        vertCount=size/3;
    }
Example 14
private ArrayList<Integer> mList;

    public void testArrayListSize() {
        int i = 0, len;
        for (; i < 100; i++) {
            len = mList.size();
            len = mList.size();
            len = mList.size();
            len = mList.size();
            len = mList.size();
            len = mList.size();
            len = mList.size();
            len = mList.size();
            len = mList.size();
            len = mList.size();
        }
    }
Example 15
private ArrayList myArrayList;

	public int size() {
		// TODO Auto-generated method stub
		return myArrayList.size();
	}
Example 16
private              ArrayList<Number> numList = new ArrayList<Number>();

    public Number getAverage() {
        if (numList.size() == 0) {
            return 0;
        } else {
            Float sum = 0f;
            for (int i = 0, size = numList.size(); i < size; i++) {
                sum = sum.floatValue() + numList.get(i).floatValue();
            }
            return sum / numList.size();
        }
    }
Example 17
protected ArrayList<Integer> resourceIDs;

    public int getSize() {
        // Tag + Size + resourceIds
        return 4 + 4 + (resourceIDs.size() * 4);
    }
Example 18
private final ArrayList<Long> mResults = new ArrayList<>();

    private double mean() {
        final int size = mResults.size();
        long sum = 0;
        for (int i = 0; i < size; ++i) {
            sum += mResults.get(i);
        }
        return (double) sum / size;
    }
Example 19
ArrayList<String> components;

  public String peekLast() {
    if (!components.isEmpty()) {
      int size = components.size();
      return (String) components.get(size - 1);
    } else {
     return null;
    }
  }
Example 20
private ArrayList list;

	public boolean isComposite()
	{
		return list.size()!=0;
	}
Example 21
private ArrayList    conditions;

	public int nrConditions()
	{
		return conditions.size();
	}
Example 22
private ArrayList           dependencies;

    public int nrDependencies()
    {
        return dependencies.size();
    }
Example 23
private ArrayList assessmentSectionIdents;

  public int getTotalSections()
  {
    return assessmentSectionIdents.size();
  }
Example 24
ArrayList<String> hidden;

    private int getHiddenCount() {

        return hidden.size();
    }
Example 25
ArrayList<Integer> labelsValues;

    private ArrayList<String> getLabelsFromValues() {

        int size = labelsValues.size();
        ArrayList<String> result = new ArrayList<>(size);
        for(int i = 0; i < size; i++)
            result.add(labelFormat.format(labelsValues.get(i)));
        return result;
    }