Checks if is the main id, or it is a secondary id.

@param id
Current id.
@param resource
Current resource.
@param lastElement
Last element of the URL.
@return true if is the main id, false otherwise.
345125
private Boolean isMainId(String id, String resource, String lastElement) {
		Boolean isMainId = false;
		if (id == null) {
			if (!utils.singularize(utils.cleanURL(lastElement)).equals(resource) && resource == null) {
				isMainId = true;
			}
		}
		return isMainId;
	}
1236948
@Override
	public String isValidID(String id) {
		Data data;
		try {
			data = identities.find(id, identities.reuse());
		} catch (IOException e) {
			return getName() + " could not lookup " + id + ": " + e.getLocalizedMessage();
		}
		return data==null?id + "is not an Identity in " + getName():null;
	}
683162
public static boolean isMainElement( Element element ){
        switch( element.getType() ) {
            case START:
            case END:
            case VALUE:
            case CALL:
            case CALL_ASYNC:
            case HUMAN_TASK:
            case WAIT_SIGNAL:
            case WAIT_TIMER:
            case WAIT_UNTIL_DATE:
            case CREATE_INSTANCE:
            case WHILE_DO_BEGIN:
            case WHILE_DO_END:
            case DO_WHILE_BEGIN:
            case DO_WHILE_END:
            case IF:
            case ELSE_IF:
            case ELSE:
            case END_IF:
            case SPLIT:
            case BRANCH:
            case JOIN_FIRST:
            case JOIN_ALL:
            case ESCALATE:
            case VALIDATE_INPUT_VARIABLE:
                return true;
            default :
                return false;
        }
    }
1229720
private static List<String> getElementsId(List<Element> elementList) {
        List<String> result = new ArrayList<String>();

        for (Element element : elementList) {
            result.add(element.getAttribute("id"));
        }

        return result;
    }
884081
function (id) {
    for (var key in this.active) {
      if (this.active.hasOwnProperty(key) && this.active[key].id === id) {
        return true;
      }
    }
    return false;
  }
388031
public E removeById(String id) {
        // traverses the list twice, but reuse code
        E element = this.getById(id);
        if (element != null) {
            this.remove(element); // this should always return true since we already found the element
        }
        return element;
    }
765330
function checkPath(id)
{
  var i;

  for (i = 0; i < this.pathsKeys.length; i++)
  {
    if (id.indexOf(this.pathsKeys[i]) == 0)
    {
      if (this.paths[this.pathsKeys[i]] == 'empty:')
      {
        id = 'empty:';
      }
      else
      {
        id = id.replace(this.pathsKeys[i], this.paths[this.pathsKeys[i]]);
      }
      break;
    }
  }

  return id;
}
1279162
protected boolean shouldRenderId(
      FacesContext context,
      UIComponent  component)
    {
      String id = component.getId();

      // Otherwise, if ID isn't set, don't bother
      if (id == null)
      {
          return false;
      }

      // ... or if the ID was generated, don't bother
      if (id.startsWith(UIViewRoot.UNIQUE_ID_PREFIX))
      {
          return false;
      }

      return true;
    }
1206254
public boolean isAfter(final T element) {
        if (element == null) {
            return false;
        }

        return lowerEndpoint.includes(element) == false;
    }
506886
public static void checkId(CmsUUID id, boolean canBeNull) {

        if (canBeNull && (id == null)) {
            return;
        }
        if ((!canBeNull && (id == null)) || id.isNullUUID()) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_INVALID_UUID_1, id));
        }
    }
1097407
public static String resourceTypeFromResourceId(String id) {
        return (id != null) ? ResourceId.fromString(id).resourceType() : null;
    }
706511
protected function checkLastSearch($id = false)
    {
        $interval = getConfig('security.search_interval');

        if (!$interval) {
            return true;
        }

        $id = $id ? md5($id) : false;
        $lastSearch = $this->request->getSession()->read('last_search');

        if ($lastSearch) {
            //Checks if it's the same search
            if ($id && !empty($lastSearch['id']) && $id === $lastSearch['id']) {
                return true;
            //Checks if the interval has not yet expired
            } elseif (($lastSearch['time'] + $interval) > time()) {
                return false;
            }
        }

        $this->request->getSession()->write('last_search', compact('id') + ['time' => time()]);

        return true;
    }
737909
protected boolean check(String id, List<String> includes) {
		if (null != includes) {
			for (String check : includes) {
				if (check(id, check)) {
					return true;
				}
			}
		}
		return false;
	}
701124
public boolean removeUserById(int id) {
		Iterator<User> it = users.iterator();
		while (it.hasNext())
			if (it.next().getId() == id) {
				it.remove();
				return true;
			}
		return false;
	}
1065048
@Override
    public final boolean has(Context cx, Object id) {
        if (cx == null) cx = Context.getCurrentContext();
        XMLName xmlName = lib.toXMLNameOrIndex(cx, id);
        if (xmlName == null) {
            long index = ScriptRuntime.lastUint32Result(cx);
            // XXX Fix this cast
            return has((int)index, this);
        }
        return hasXMLProperty(xmlName);
    }
957266
public static boolean checkClientId(boolean isLegacyAttributeList, String farEndClientID) {
		if (ZRTP.CLIENT_ID_LEGACY.equals(farEndClientID)) 
			return true;
		
		if (ZRTP.CLIENT_ID_RFC.equals(farEndClientID)) 
			return false;
		
		boolean isPrintable = true;
		
		for (int i = 0; i < farEndClientID.length(); i++) {
			int singleChar = farEndClientID.charAt(i);
			if (singleChar < 32 || singleChar >= 127) {
				isPrintable = false;
			}
		}
		return !isPrintable && isLegacyAttributeList;
	}
242372
public void updateNodeForId(final CmsUUID id) {

        final List<CmsSitemapTreeNode> nodes = Lists.newArrayList();
        CmsVaadinUtils.visitDescendants(m_currentRootNode, new Predicate<Component>() {

            public boolean apply(Component input) {

                if (input instanceof CmsSitemapTreeNode) {
                    CmsSitemapTreeNode node = (CmsSitemapTreeNode)input;
                    CmsSitemapTreeNodeData data = (CmsSitemapTreeNodeData)node.getData();
                    if (data.getResource().getStructureId().equals(id)) {
                        nodes.add(node);
                        return false;
                    }
                }
                return true;
            }
        });
        if (nodes.size() == 1) {
            updateNode(nodes.get(0));
        }

    }