APISonar


java.util.ArrayList.set

> java > util > ArrayList > set
java APIs util APIs ArrayList APIs set APIs

Example 1
private ArrayList<Integer> mList;

    public void testArrayListSet() {
        int i = 0;
        for (; i < 10; i++) {
            mList.set(5, 0);
            mList.set(5, 0);
            mList.set(5, 0);
            mList.set(5, 0);
            mList.set(5, 0);
            mList.set(5, 0);
            mList.set(5, 0);
            mList.set(5, 0);
            mList.set(5, 0);
            mList.set(5, 0);
        }
    }
Example 2
private ArrayList values = null;

    private boolean set(int i) {
        Iterator it = (Iterator)(iterators.get(i));
        if (it.hasNext()) {
            values.set(i, it.next());
            valueSet.set(i);
            return true;
        } else {
            values.set(i,null);
            valueSet.clear(i);
            return false;
        }
    }
Example 3
private ArrayList<T> mItems;

	public void set(int position, T item) {
		mItems.set(position, item);
		notifyDataSetChanged();
	}
Example 4
private ArrayList<String> strings = new ArrayList<>();

	public void set(int elementNum, String stringPart, Image imagePart) {
		synchronized (selected) {
			strings.set(elementNum, stringPart);
			images.set(elementNum, imagePart);

			if (list != null) {
				adapter.set(elementNum, stringPart, imagePart);
			}
		}
	}
Example 5
private ArrayList<T> value = new ArrayList<T>();

    public K set(int offset, T v) {
        value.set(offset, v);
        firePropertyChanged();
        return (K)parent.parent;
    }
Example 6
private ArrayList<T> array;

  public void set(int index, T value) {
    ensureLength(index);
    array.set(index, value);
  }
Example 7
private ArrayList<Boolean> isOverlayDirty;

    private void markAsDirty(int index) {
        isOverlayDirty.set(index, true);
        if (index - 1 >= 0) {
            isOverlayDirty.set(index - 1, true);
        }

        if (index + 1 < isOverlayDirty.size()) {
            isOverlayDirty.set(index + 1, true);
        }
    }
Example 8
private ArrayList list = new ArrayList() ;

    public void set( int key, Object value )
    {
        checkKey( key ) ;
        extend( key ) ;
        list.set( key, value ) ;
    }
Example 9
private ArrayList myArrayList;

	public Object set(int index, Object element) {
		// TODO Auto-generated method stub
		return myArrayList.set(index,element);
	}
Example 10
private ArrayList list;

	public void setCondition(int i, Condition subCondition)
	{
	    list.set(i, subCondition);
	}
Example 11
ArrayList<off_graph_edge> varGraph;

  private off_graph_edge add_graph_edge(int s, int t) {
    off_graph_edge e = new off_graph_edge();

    e.s = s;
    e.t = t;
    e.next = varGraph.get(s);
    varGraph.set(s, e);

    return e;
  }
Example 12
protected ArrayList<T> elements = new ArrayList<T>();

    public T set(int i, T value) {
        T oldElement = elements.get(i);
        elements.set(i,value); // update list
        super.remove(oldElement); // now update the set: remove/add
        super.add(value);
        return oldElement;
    }
Example 13
protected final ArrayList<T> mData = new ArrayList<T>();

    public T set(int location, T object) {
        T origin = mData.set(location, object);
        notifyItemChanged(location  + 1);
        return origin;
    }
Example 14
private final ArrayList<String> localVarMatches = new ArrayList<>();

  private void reset() {
    isLooseMatch = false;
    for (int i = 0; i < localVarMatches.size(); i++) {
      localVarMatches.set(i, null);
    }
    for (int i = 0; i < paramNodeMatches.size(); i++) {
      this.paramNodeMatches.set(i, null);
    }
  }
Example 15
private ArrayList getConnectList() {
        ArrayList l = new ArrayList(uris);

        // Randomly, reorder the list by random swapping
        Random r = new Random();
        r.setSeed(System.currentTimeMillis());
        for (int i = 0; i < l.size(); i++) {
            int p = r.nextInt(l.size());
            Object t = l.get(p);
            l.set(p, l.get(i));
            l.set(i, t);
        }
        return l;
    }
Example 16
private ArrayList values = null;

    private void clear(int i) {
        values.set(i,null);
        valueSet.clear(i);
    }
Example 17
private ArrayList<Double> weights_;    // weights for sampled items

  private void swapValues(final int src, final int dst) {
    final T item = data_.get(src);
    data_.set(src, data_.get(dst));
    data_.set(dst, item);

    final Double wt = weights_.get(src);
    weights_.set(src, weights_.get(dst));
    weights_.set(dst, wt);

    if (marks_ != null) {
      final Boolean mark = marks_.get(src);
      marks_.set(src, marks_.get(dst));
      marks_.set(dst, mark);
    }
  }
Example 18
private final ArrayList tsIindexes;   // ArrayList of Integer

   public void invert()
   {
      for (int x=0; x<tsIindexes.size(); x++)
      {
         final Object temp = tsIindexes.get(x);
         tsIindexes.set(x, tsJindexes.get(x));
         tsJindexes.set(x, temp);
      }
   }  // end invert()
Example 19
ArrayList<T> al = new ArrayList<T>();

  public boolean remove(T o) {
    Integer i = map.remove(o);
    if (i == null) {
      return false;
    }
    al.set(i, null);
    return true;
  }
Example 20
public void setLast(T obj)
   {
      ArrayList<T> stack = getStack(true);
      if(stack.isEmpty())
      {
         stack.add(obj);
      } 
      else 
      {
         stack.set(stack.size() - 1, obj);
      }
   }
Example 21
ArrayList content;

    public void set( int index, Object value ) {
        if ( content == null )
            throw new IndexOutOfBoundsException("size "+size()+" index:"+index);
        content.set(index,value);
    }
Example 22
private final ArrayList<T> objects;

	public T set(final int index, final T element) {
		final T result = objects.set(index, element);
		if (result != null) announceStructureChange();
		return result;
	}
Example 23
private ArrayList arguments = new ArrayList();

    private void commitChanges() {
        //mainComment = mainCommentTextArea.getText();
        if (editingRow != -1) {
            //comments.set (editingRow, commentTextArea.getText());
            arguments.set(editingRow, codePane.getText());
            getListModel().fireContentsChanged(editingRow, editingRow);
        }
    }
Example 24
private ArrayList<String[]> warnings;

  public void removeWarnings() {
    int index = getCurrentRuleIndex();
    warnings.set(index, new String[0]);
    displayWarnings();
  }
Example 25
protected ArrayList<Integer> numBlocks;

  public void startBlock() {
    inBlock.clear();
    numBlocks.set(numLG - 1, numBlocks.get(numLG - 1) + 1);
  }