Index of a view in the GUI: 0 for the first view of a given
        class, 1 for the next, and so on.
775439
def _get_view_index(self, view):
        """"""
        name = view.__class__.__name__
        return len(self.list_views(name))
885487
private int getPrototypeIndex(Renderer renderer) {
    int index = 0;
    for (Renderer prototype : prototypes) {
      if (prototype.getClass().equals(renderer.getClass())) {
        break;
      }
      index++;
    }
    return index;
  }
386462
def view(self, cls=None):
        
        result = self.copy()
        result._id = self._id
        return result
1253914
private double getPrior(int classIndex) {
		// Maximum likelihood
		Double currentCount = this.classInstances.get(classIndex);
		if (currentCount == null || currentCount == 0)
			return 0;
		else
			return currentCount * 1. / this.instancesSeen;
	}
439433
private int viewIndexForColumn(TableColumn aColumn) {
        TableColumnModel cm = table.getColumnModel();

        for (int column = 0; column < cm.getColumnCount(); column++) {
            if (cm.getColumn(column) == aColumn) {
                return column;
            }
        }

        return -1;
    }
701002
static int computeNewIndex(int index, List<ArrayParameter> arrayParametersSortedAsc) {
        int newIndex = index;
        for(ArrayParameter arrayParameter : arrayParametersSortedAsc) {
            if(index > arrayParameter.parameterIndex) {
                newIndex = newIndex + arrayParameter.parameterCount - 1;
            } else {
                return newIndex;
            }
        }
        return newIndex;
    }
964070
public final int getIndex(String name, Object... args) {
    Integer defaultIndex = methodIndexs.get(name);
    if (null != defaultIndex) return defaultIndex.intValue();
    else {
      final List<MethodInfo> exists = methods.get(name);
      if (null != exists) {
        for (MethodInfo info : exists)
          if (info.matches(args)) return info.index;
      }
      return -1;
    }
  }
591334
def visualRect(self, index):
        
        rect = super(XTreeWidget, self).visualRect(index)
        item = self.itemFromIndex(index)
        if not rect.isNull() and item and item.isFirstColumnSpanned():
            vpos = self.viewport().mapFromParent(QtCore.QPoint(0, 0))
            rect.setX(vpos.x())
            rect.setWidth(self.width())
            return rect
        return rect
296154
private void showStep(int index) {
		if (index >= 0 && index < wizardSteps.size()) {
			currentStep = wizardSteps.get(index);
			// only show current step
			for (WizardStepView view : wizardSteps) {
				view.getWidget().setVisible(currentStep == view);
			}
			controllerButtonsWindow.setSubTitle(currentStep.getTitle());
			controllerButtonsWindow.setPreviousButtonEnabled(index > 0);
			controllerButtonsWindow.setNextButtonEnabled(index + 1 < wizardSteps.size());
			controllerButtonsWindow.setWarningLabelText(null, false);

			//only allow save on last step
			controllerButtonsWindow.setSaveButtonEnabled(index + 1 == wizardSteps.size());
			logger.info("Client WMS layer wizard, current step "
					+ (currentStep != null ? currentStep.getClass().toString() : "none"));
		} else {
			hideAndCleanWindow();
		}
	}
1220971
def gotoPrevious(self):
        
        index = self._currentPanel.currentIndex() - 1
        if index < 0:
            index = self._currentPanel.count() - 1
        
        self._currentPanel.setCurrentIndex(index)
866228
@Override
    public int classIndex() {
        int classIndex = instanceHeader.classIndex();
       // return  ? classIndex : 0;
        if(classIndex == Integer.MAX_VALUE)
        	if(this.instanceHeader.instanceInformation.range!=null)
        		classIndex=instanceHeader.instanceInformation.range.getStart();
        	else
        		classIndex=0;
        return classIndex;
    }
1094674
def _update_index(self):
         
        d = self.declaration
        self.index = self.view.model.index(d.row, d.column)
        if self.delegate:
            self._refresh_count += 1
            timed_call(self._loading_interval, self._update_delegate)
608159
@Override
	@SuppressWarnings("unchecked")
	@Pure
	public int indexOf(Object obj) {
		if (obj == null) {
			return -1;
		}
		final P element;
		try {
			element = (P) obj;
		} catch (ClassCastException exception) {
			return -1;
		}
		final Iterator<P> iter = this.tree.dataDepthFirstIterator();
		P data;
		int idx = 0;
		while (iter.hasNext()) {
			data = iter.next();
			if (data == element) {
				return idx;
			}
			++idx;
		}
		return -1;
	}
14801
def nth_view(element_id, index)
      element = nth(element_id)
      if element.is_a?(Layout)
        element = element.view
      end
      element
    end
616038
protected void setFirstView() {
        final AbstractLmlView firstView = getCurrentView();
        if (firstView == null) {
            throw new GdxRuntimeException("No view marked as first. Unable to start application.");
        }
        setCurrentView(null);
        initiateView(firstView);
        setView(firstView, null);
    }
42147
def index(self, sub, start=None, end=None):
        
        return self.value_no_colors.index(sub, start, end)
861456
def index(self, slide_layout):
        
        for idx, this_layout in enumerate(self):
            if slide_layout == this_layout:
                return idx
        raise ValueError("layout not in this SlideLayouts collection")