If not already created, a new <code>tag</code> element will be created and returned.
Otherwise, the first existing <code>tag</code> element will be returned.
@return the instance defined for the element <code>tag</code>
359033
public FaceletTaglibTagType<WebFacelettaglibraryDescriptor> getOrCreateTag()
   {
      List<Node> nodeList = model.get("tag");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FaceletTaglibTagTypeImpl<WebFacelettaglibraryDescriptor>(this, "tag", model, nodeList.get(0));
      }
      return createTag();
   }
1164156
public T next() {
        if (entry == null) return null;
        entry = entry.next;
        return entry.element;
    }
125628
def _new_instance(self):
        

        new_obj = self.__class__()
        new_obj.class_ = self.class_
        new_obj.tag = self.tag
        new_obj.implicit = self.implicit
        new_obj.explicit = self.explicit
        return new_obj
924605
public TagSetModel getOrCreate(GraphRewrite event, Set<String> tags)
    {
        Map<Set<String>, Vertex> cache = getCache(event);
        Vertex vertex = cache.get(tags);
        if (vertex == null)
        {
            TagSetModel model = create();
            model.setTags(tags);
            cache.put(tags, model.getElement());
            return model;
        }
        else
        {
            return frame(vertex);
        }
    }
965702
public static Tag createInstance(int id, String tagName) throws TagCreateException {
        Class<? extends Tag> clazz = idToTag.get(id);
        if(clazz == null) {
            throw new TagCreateException("Could not find tag with ID \"" + id + "\".");
        }

        try {
            Constructor<? extends Tag> constructor = clazz.getDeclaredConstructor(String.class);
            constructor.setAccessible(true);
            return constructor.newInstance(tagName);
        } catch(Exception e) {
            throw new TagCreateException("Failed to create instance of tag \"" + clazz.getSimpleName() + "\".", e);
        }
    }
580235
public Tag get(int theIndex) {
		if (myOrderedTags == null) {
			myOrderedTags = new ArrayList<Tag>();
			for (Tag next : myTagSet) {
				myOrderedTags.add(next);
			}
		}
		return myOrderedTags.get(theIndex);
	}
1161008
public Element createElement(String tagName) {
        return new Element(Tag.valueOf(tagName, ParseSettings.preserveCase), this.baseUri());
    }
854082
public FaceletTaglibTagType<FaceletTaglibType<T>> getOrCreateTag()
   {
      List<Node> nodeList = childNode.get("tag");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FaceletTaglibTagTypeImpl<FaceletTaglibType<T>>(this, "tag", childNode, nodeList.get(0));
      }
      return createTag();
   }
1000028
public int getIdByTag(String tag)
    {
        Integer value = (Integer) table.getValueByKey(tag);
        if (value == null)
            LoggerFactory.getDefaultLogger().error(
                "** " + this.getClass().getName() + ": Tag '" + tag + "' is not defined. **");
        return value.intValue();
    }
1273512
public Builder tag(String tag) {
        ends.push("</" + tag + ">");
        html.a('<').a(tag).a('>');
        return this;
    }
1004515
public java.util.List<Tag> getTagSet() {
        if (tagSet == null) {
            tagSet = new com.amazonaws.internal.SdkInternalList<Tag>();
        }
        return tagSet;
    }
708832
function(tag) {
		if (!tag) {
			// create a document fragment to hold multiple-root elements
			if (document.createDocumentFragment) {
				return document.createDocumentFragment();
			}

			tag = '';

		} else if (tag.charAt(0) === '!') {
			return document.createComment(tag === '!' ? '' : tag.substr(1)+' ');
		}

		return document.createElement(tag);
	}
163231
public Id<Attributes<T>> getOrCreateId()
   {
      List<Node> nodeList = childNode.get("id");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new IdImpl<Attributes<T>>(this, "id", childNode, nodeList.get(0));
      }
      return createId();
   }
435413
public Tag create(String name) {
        String url = WxEndpoint.get("url.tag.create");
        TagWrapper tag = new TagWrapper(name);
        String json = JsonMapper.nonEmptyMapper().toJson(tag);
        logger.debug("create tag: {}", json);
        String response = wxClient.post(url, json);
        TagWrapper wrapper = JsonMapper.defaultMapper().fromJson(response, TagWrapper.class);
        return wrapper.getTag();
    }
506155
public Map<String, String> getInstanceTags() {
        Map<String, String> map = new HashMap<>();
        Instance instance = this.getInstance();
        for (Tag tag : instance.getTags()) {
            map.put(tag.getKey(), tag.getValue());
        }
        return map;
    }
970910
protected TagView getInputTag() {
        if (isAppendMode) {
            final int inputTagIndex = getChildCount() - 1;
            final TagView inputTag = getTagAt(inputTagIndex);
            if (inputTag != null && inputTag.mState == TagView.STATE_INPUT) {
                return inputTag;
            } else {
                return null;
            }
        } else {
            return null;
        }
    }
934109
public By defineByElement() {
        // consider adding strengthening
        By byElement = null;
        switch (type) { // determine which locator type we are interested in
            case XPATH:
                byElement = By.xpath(locator);
                break;
            case ID:
                byElement = By.id(locator);
                break;
            case NAME:
                byElement = By.name(locator);
                break;
            case CLASSNAME:
                byElement = By.className(locator);
                break;
            case CSS:
                byElement = By.cssSelector(locator);
                break;
            case LINKTEXT:
                byElement = By.linkText(locator);
                break;
            case PARTIALLINKTEXT:
                byElement = By.partialLinkText(locator);
                break;
            case TAGNAME:
                byElement = By.tagName(locator);
                break;
        }
        return byElement;
    }