Code example for CopyOnWriteArrayList

Methods: addAllcleargetsizetoArray

0
	} 
 
	public synchronized void cycleSelection(boolean rotate)
	{ 
 
		int size = reflectorList.size();
		 
		if (size == 0)
			return; 
		if (selectionNumber >= size)
		{ 
 
			selectionNumber = 0;
 
		} 
		Reflector[] rArray = new Reflector[0];
		rArray = reflectorList.toArray(rArray);
		 
		Arrays.sort(rArray);
		 
		reflectorList.clear();
		reflectorList.addAll(Arrays.asList((Reflector[])rArray));
 
		Reflector r = reflectorList.get(selectionNumber);
 
		selectionNumber++;
		if (rotate)
			r.setAction(ReflectorManager.MOVE_P1);
		else 
Contextual code suggestions in your IDE  Get Codota for Java