Check if a particular control is currently pressed

@param index The index of the control
@param controllerIndex The index of the control to which the control belongs
@return True if the control is pressed
186968
private boolean isControlDwn(int index, int controllerIndex) {
		switch (index) {
		case LEFT:
			return isControllerLeft(controllerIndex);
		case RIGHT:
			return isControllerRight(controllerIndex);
		case UP:
			return isControllerUp(controllerIndex);
		case DOWN:
			return isControllerDown(controllerIndex);
		}
		
		if (index >= BUTTON1) {
			return isButtonPressed((index-BUTTON1), controllerIndex);
		}

		throw new RuntimeException("Unknown control index");
	}
206288
protected function checkIndex(Index $index, IgnoredChange $ignoredChange)
    {
        // Not needed to be implemented yet
        if ($ignoredChange->getPropertyName() !== $index->getName()) {
            return false;
        }

        return false;
    }
1208012
function () {
    this.controllerPresent = false;
    this.isControllerPresent = trackedControlsUtils.isControllerPresent; // to allow mock
    this.buttonStates = {};
    this.previousAxis = [];
    this.onModelLoaded = bind(this.onModelLoaded, this);
    this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);
    this.onGamepadConnected = bind(this.onGamepadConnected, this);
    this.onGamepadDisconnected = bind(this.onGamepadDisconnected, this);
  }
1305216
public boolean exists(String index) {
        boolean exists = false;

        if (indexNames.isEmpty() == false) {
            for (i = 0; i < indexNames.size(); i++) {
                if (index.equals((String) indexNames.elementAt(i))) {
                    exists = true;
                    break;
                }
            }
        }

        return exists;
    }
758184
protected boolean isIndexed(InternalQName propertyName)
   {
      if (indexingConfig == null)
      {
         return true;
      }
      else
      {
         return indexingConfig.isIndexed(node, propertyName);
      }
   }
572046
public function hasIndex($index, $collection)
    {
        if (empty($this->queriesResultCache[ 'collectionIndexes' ][ $collection ])) {
            $this->getIndexes($collection);
        }

        return (bool)in_array($index, $this->queriesResultCache[ 'collectionIndexes' ][ $collection ]);
    }
1344162
public boolean nextIndex(long index) {
    if (operationIndex + 1 == index) {
      currentOperation = OperationType.COMMAND;
      operationIndex++;
      return true;
    }
    return false;
  }
921063
@Override
    public boolean has(int index, Scriptable start)
    {
        if (externalData != null) {
            return (index < externalData.getArrayLength());
        }
        return null != slotMap.query(null, index);
    }
202961
boolean isFieldVarying(int index) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "isFieldVarying", new Object[]{Integer.valueOf(index)});

    boolean result = map.fields[index].varying;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "isFieldVarying", Boolean.valueOf(result));
    return result;
  }
865186
public void clickOnCheckBox(int index) {
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "clickOnCheckBox("+index+")");
		}
		
		clicker.clickOn(CheckBox.class, index);
	}
841479
protected boolean checkTileIndex (int tileIndex)
    {
        int tcount = getTileCount();
        if (tileIndex >= 0 && tileIndex < tcount) {
            return true;
        } else {
            log.warning("Requested invalid tile [tset=" + this + ", index=" + tileIndex + "].",
                        new Exception());
            return false;
        }
    }
731880
public static boolean isButtonPressed(Button button) {

        if (button == null) {
            return false;
        }
        List<String> styles = Arrays.asList(button.getStyleName().split(" "));

        return styles.contains(OpenCmsTheme.BUTTON_PRESSED);
    }
228641
def HasIndex(self, index):
        
        for i in self.Items:
            if i.index == index:
                return True
        return False
495085
private boolean isChangedPosition(I_CmsDropTarget target) {

        // if the new index is not next to the old one, the position has changed
        if ((target != m_initialDropTarget)
            || !((target.getPlaceholderIndex() == (m_originalIndex + 1))
                || (target.getPlaceholderIndex() == m_originalIndex))) {
            return true;
        }
        return false;
    }
642515
def is_pressed(self, button):
        """"""
        if button not in set((SELECT, RIGHT, DOWN, UP, LEFT)):
            raise ValueError('Unknown button, must be SELECT, RIGHT, DOWN, UP, or LEFT.')
        return self._mcp.get(button)
349864
public boolean isNull(int index) throws LazyException{
		LazyNode token=getValueToken(index);
		if(token.type==LazyNode.VALUE_NULL)return true;
		return false;
	}
514193
public boolean isControllerLeft(int controller) {
		if (controller >= getControllerCount()) {
			return false;
		}
		
		if (controller == ANY_CONTROLLER) {
			for (int i=0;i<controllers.size();i++) {
				if (isControllerLeft(i)) {
					return true;
				}
			}
			
			return false;
		}
		
		return ((Controller) controllers.get(controller)).getXAxisValue() < -0.5f
				|| ((Controller) controllers.get(controller)).getPovX() < -0.5f;
	}