APISonar


java.util.ArrayList.indexOf

> java > util > ArrayList > indexOf
java APIs util APIs ArrayList APIs indexOf APIs

Example 1
private final ArrayList<T> _list;

  public int indexOf( T o )
  {
    return _list.indexOf( o );
  }
Example 2
protected ArrayList list = null;

    public int indexOf(Object element) {

        if (fast) {
            return (list.indexOf(element));
        } else {
            synchronized (list) {
                return (list.indexOf(element));
            }
        }

    }
Example 3
private ArrayList myArrayList;

	public int indexOf(Object o) {
		// TODO Auto-generated method stub
		return myArrayList.indexOf(o);
	}
Example 4
private final ArrayList<Object> list             = new ArrayList<Object>();

  public int indexOf(final Object o) {
    convertAll();
    return list.indexOf(o);
  }
Example 5
private   ArrayList      relationships;

	public int indexOfRelationship(Object ri)
	{
		return relationships.indexOf(ri);
	}
Example 6
private   ArrayList      tables;

	public int indexOfTable(Object ti)
	{
		return tables.indexOf(ti);
	}
Example 7
public    ArrayList      databases;

	public int indexOfConnection(Object ci)
	{
		return databases.indexOf(ci);
	}
Example 8
ArrayList<String> list;

    public boolean contains(String s)
    {
        int index = list.indexOf(s);
        if (index == -1) return false;
        return true;
    }
Example 9
private boolean isCorrectLabel(String testLabel, ArrayList labels)
  {
    if (testLabel == null || labels == null
        || labels.indexOf(testLabel) == -1)
    {
      return false;
    }

    return true;
  }
Example 10
private ArrayList<String> indexedLocals;

  public int variableIndexOf(String name) {
    if (indexedInputs != null) {
      int idx = indexedInputs.indexOf(name);
      if (idx == -1 && indexedLocals != null) {
        idx = indexedLocals.indexOf(name);
        if (idx != -1) {
          idx += indexedInputs.size();
        }
      }
      return idx;
    }

    return -1;
  }
Example 11
private ArrayList definitionElement;

    public void setDefiningAttribute(String elementName, String attributeName)
    {
    	int index = definitionElement.indexOf(elementName);
    	if(index>=0)
    	{
    		definitionAttribute.set(index,attributeName);
    	}
    	else
    	{
    		definitionAttribute.add(attributeName);
    		definitionElement.add(elementName);
    	}
    }
Example 12
private boolean isCorrectAnswer2(String answerText, ArrayList correctLabels)
  {
    if (answerText == null || correctLabels == null)
    {
      return false;
    }
    else {
    	String [] data = answerText.split(":::");
    	if (correctLabels.indexOf(data[0]) == -1) {
    		return false;
    	}
    }
    return true;
  }
Example 13
private ArrayList<Integer> claimedSet;

	void removeClaimed(int pid) {
		int ind = claimedSet.indexOf(pid);
		claimedSet.remove(ind);
	}
Example 14
private ArrayList<String> mMessageUids;

    private void findSurroundingMessagesUid()
    {
        mNextMessageUid = mPreviousMessageUid = null;
        int i = mMessageUids.indexOf(mMessageUid);
        if (i < 0)
            return;
        if (i != 0)
            mNextMessageUid = mMessageUids.get(i - 1);
        if (i != (mMessageUids.size() - 1))
            mPreviousMessageUid = mMessageUids.get(i + 1);
    }
Example 15
private ArrayList<String> names = new ArrayList<String>();

    public void removeAttribute(String name) {
        int i = names.indexOf(name);
        if (i != -1) {
            names.remove(i);
            types.remove(i);
            values.remove(i);
        }
    }
Example 16
ArrayList<Integer> tabOrder_ = new ArrayList<Integer>();

   public int getPhysicalTabIndex()
   {
      int idx = view_.getActiveTabIndex();
      if (idx < tabOrder_.size())
      {
         idx = tabOrder_.indexOf(idx);
      }
      return idx;
   }
Example 17
private ArrayList    conditions;

	public int indexOfCondition(WhereCondition c)
	{
		return conditions.indexOf(c);
	}
Example 18
private ArrayList    fields;

	public int indexOfField(TableField f)
	{
		return fields.indexOf(f);
	}
Example 19
private ArrayList<Integer> filter;

    private int getUnderlyingOffset(int index) {
        if(filter == null) {
            return index;
        }
        return filter.indexOf(new Integer(index));
    }
Example 20
private final ArrayList<Transferable> myDatas;

  public void removeContent(Transferable t) {
    Transferable old = getContents();
    boolean isCurrentClipboardContent = myDatas.indexOf(t) == 0;
    myDatas.remove(t);
    if (isCurrentClipboardContent) {
      if (!myDatas.isEmpty()) {
        setSystemClipboardContent(myDatas.get(0));
      }
      else {
        setSystemClipboardContent(new StringSelection(""));
      }
    }
    fireContentChanged(old);
  }
Example 21
private static ArrayList<String> constantPool = new ArrayList<String>();

    public static int addToConstantPool(String s) {
        int i = constantPool.indexOf(s);
        if(i < 0) {
            constantPool.add(s);
            return constantPool.size() - 1;
        }
        return i;
    }
Example 22
private final ArrayList<Object> metaEventListeners = new ArrayList<>();

    public void removeMetaEventListener(MetaEventListener listener) {
        synchronized(metaEventListeners) {
            int index = metaEventListeners.indexOf(listener);
            if (index >= 0) {
                metaEventListeners.remove(index);
            }
        }
    }
Example 23
private ArrayList<String> _groups;

    public void removeGroup(String group) {
        int position = _groups.indexOf(group);
        _groups.remove(position);
        notifyItemRemoved(position);
    }
Example 24
private final ArrayList<String> stems;

    public void add(int i, String element) {
        int existing = stems.indexOf(element);
        if (existing < 0) {
            stems.add(i, element);
        }
    }
Example 25
private static <T> void removeEntry(ArrayList<T> list, T entry) {
    int id = list.indexOf(entry);
    if (id >= 0) {
      list.set(id, null);
    }
  }