If not already created, a new <code>id</code> element will be created and returned.
Otherwise, the first existing <code>id</code> element will be returned.
@return the instance defined for the element <code>id</code>
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();
   }
676026
public Integer getAndIncrementIDSeq(final String id) {
        Validate.notNull(id, "ID cannot be null");
        Integer count = this.idCounts.get(id);
        if (count == null) {
            count = Integer.valueOf(1);
        }
        this.idCounts.put(id, Integer.valueOf(count.intValue() + 1));
        return count;
    }
137269
public int getElementId() {
    if (DocumentElement_Type.featOkTst && ((DocumentElement_Type)jcasType).casFeat_ElementId == null)
      jcasType.jcas.throwFeatMissing("ElementId", "ch.epfl.bbp.uima.types.DocumentElement");
    return jcasType.ll_cas.ll_getIntValue(addr, ((DocumentElement_Type)jcasType).casFeatCode_ElementId);}
1283397
public final long getNewID ()
  {
    return m_aLock.locked ( () -> {
      if (m_nID >= m_nLastID)
      {
        // Read new IDs
        final long nNewID = readAndUpdateIDCounter (m_nReserveCount);

        // the existing ID may not be < than the previously used ID!
        if (m_nLastID >= 0 && nNewID < m_nID)
          throw new IllegalStateException ("The read value " +
                                           nNewID +
                                           " is smaller than the last known ID " +
                                           m_nID +
                                           "!");

        m_nID = nNewID;
        m_nLastID = nNewID + m_nReserveCount;
      }
      return m_nID++;
    });
  }
1080813
public <T extends Entity<ID>, ID extends Serializable> T newInstance(final Class<T> clazz, final ID id) {
    EntityType type = getEntityType(clazz);
    @SuppressWarnings("unchecked")
    T entity = (T) type.newInstance();
    try {
      PropertyUtils.setProperty(entity, type.getIdName(), id);
    } catch (Exception e) {
      logger.error("initialize {} with id {} error", clazz, id);
    }
    return entity;
  }
309045
@Override
    public String get() {

        final String s = randomUUID().toString();
        final String id;

        if (count > 0 && length > 0) {
            final StringJoiner joiner = new StringJoiner("/", "", "/" + s);

            IntStream.rangeClosed(0, count - 1)
            .forEach(x -> joiner.add(s.substring(x * length, (x + 1) * length)));
            id = joiner.toString();
        } else {
            id = s;
        }
        return id;
    }
22863
public int getStartingID()
    {
        int iStartingID = 1;   // (default)
        if (this.getProperty(STARTING_ID) != null)
        {
            try {
                iStartingID = Integer.parseInt(this.getProperty(STARTING_ID));
            } catch (NumberFormatException e) {
                iStartingID = 1;
            }
        }
        return iStartingID;
    }
669713
public T nextElement() {
        T rc = null;
        if (null == this.myIterator) {
            rc = this.singleton;
            this.singleton = null;
        } else {
            rc = this.myIterator.next();
        }
        return rc;
    }
1217279
public Element createElement(String tagName, String id) {
		Element element = DOM.createElement(tagName).cast();
		DOM.setElementAttribute(element, "id", id);
		return element;
	}
510575
def get_unique_id(element):
    """"""
    this_id = make_id(element)
    dup = True
    while dup:
        if this_id not in ids:
            dup = False
            ids.append(this_id)
        else:
            this_id = make_id(element)
    return ids[-1]
149194
public Object previous() {
        Object element = null;
        if (previousElement != null) {
            element = previousElement;
            previousElement = null;
        } else {
            element = getPreviousElement();
            if (element == null) {
                throw new java.util.NoSuchElementException();
            }
        }
        return element;
    }
632724
public String newId() {
		String res = getEntity(invokeGet("utils/newid", null), String.class);
		return res != null ? res : "";
	}
464596
public Dissector getNewInstance() {
        try {
            Constructor<? extends Dissector> co = this.getClass().getConstructor();
            Dissector newInstance = co.newInstance();
            initializeNewInstance(newInstance);
            return newInstance;
        } catch (Exception e) {
            LOG.error("Unable to create instance of {}: {}", this.getClass().getCanonicalName(), e);
        }
        return null;
    }
1082356
function getId(element) {
        var state = getState(element);

        if (state && state.id !== undefined) {
            return state.id;
        }

        return null;
    }
810973
@Override
    public String getId() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "getId");
        if (id == null)
        {
            // Set id to the class name
            id = this.getClass().getName();
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "getId", new Object[] { id });
        return id;
    }
948285
public static JusFragment newInstance() {
		JusFragment fragment = new JusFragment();
		Bundle args = new Bundle();
		fragment.setArguments(args);
		return fragment;
	}
331586
public static IdGenerator getInstance(long nodeId) {
        IdGenerator idGen = cache.get(nodeId);
        if (idGen == null) {
            idGen = new IdGenerator(nodeId);
            idGen.init();
            IdGenerator existing = cache.putIfAbsent(nodeId, idGen);
            idGen = existing != null ? existing : idGen;
        }
        return idGen;
    }