Adjust list of members according to their names. Check the first
character in a member name, and then add the member to a list of members
for that particular unicode character.

@param elements Array of members.
975383
protected void adjustIndexMap(Iterable<? extends Element> elements) {
        for (Element element : elements) {
            if (shouldAddToIndexMap(element)) {
                String name = utils.isPackage(element)
                        ? utils.getPackageName((PackageElement)element)
                        : utils.getSimpleName(element);
                char ch = (name.length() == 0) ?
                          '*' :
                          Character.toUpperCase(name.charAt(0));
                Character unicode = ch;
                SortedSet<Element> list = indexmap.computeIfAbsent(unicode,
                        c -> new TreeSet<>(comparator));
                list.add(element);
            }
        }
    }
119777
public void setIfexistsone(String elementList) {

        if (elementList != null) {
            m_elementList = elementList;
            m_checkall = false;
            m_checknone = false;
        }
    }
485617
public void addElements(
                    final Collection<? extends T> elements
                    )
    {
        if (elements == null  ||  elements.size() == 0) {
            return;
        }

        for (T  obj : elements) {
            addElement( obj );
        }
    }
311010
private void initAttributesAndElements(String... propertyNames)
        {
        for (String propertyName : propertyNames)
            {
            Property property = new Property(propertyName);
            if (property.isAttribute())
                {
                m_attributes.add(property);
                }
            else
                {
                m_elements.add(property);
                }
            }
        }
751246
public static <T> Level0ArrayOperator<Character[],Character> onArrayFor(final Character... elements) {
        return onArrayOf(Types.CHARACTER, VarArgsUtil.asRequiredObjectArray(elements));
    }
806818
public void addSingletonCell(int element) {
        SortedSet<Integer> cell = new TreeSet<Integer>();
        cell.add(element);
        this.cells.add(cell);
    }
138655
public ElementsBuilder addAll(IsElement... elements) {
        for (IsElement element : elements) {
            add(element);
        }
        return that();
    }
705478
public void add(int index, double element)
    {
        if(index == size())//special case, just appending
        {
            add(element);
        }
        else
        {
            boundsCheck(index);
            enlageIfNeeded(1);
            System.arraycopy(array, index, array, index+1, size()-index);
            set(index, element);
            increasedSize(1);
        }
    }
8116
void addElement(KElement element) {
		if (!this.elements.contains(element)) {
			element.setIndex(this.elements.size());
			this.elements.add(element);
		}
	}
477860
public void add(int index, int element)
    {
        if (index == size())//special case, just appending
        {
            add(element);
        }
        else
        {
            boundsCheck(index);
            enlargeIfNeeded(1);
            System.arraycopy(array, index, array, index+1, end-index);
            array[index] = element;
            end++;
        }
    }
547871
protected void initBodyElementName(String elementName) {

        if ((elementName == null)
            || (m_page.hasValue(elementName, getElementLocale())
                && !m_page.isEnabled(elementName, getElementLocale()))) {
            // elementName not specified or given element is disabled, determine default element
            List<String> allElements = m_page.getNames(getElementLocale());
            int elementCount = allElements.size();
            List<String> elements = new ArrayList<String>(elementCount);
            for (int i = 0; i < elementCount; i++) {
                // filter disabled elements
                if (m_page.isEnabled(allElements.get(i), getElementLocale())) {
                    elements.add(allElements.get(i));
                }
            }

            // get the active page elements
            List<CmsDialogElement> elementList = getElementList();
            for (int i = 0; i < elementList.size(); i++) {
                CmsDialogElement checkElement = elementList.get(i);
                if (elements.contains(checkElement.getName())) {
                    // get the first active element from the element list
                    setParamElementname(checkElement.getName());
                    return;
                }
            }

            // no matching active element found
            if (elements.contains(CmsDefaultPageEditor.XML_BODY_ELEMENT)) {
                // default legacy element present, use it
                setParamElementname(CmsDefaultPageEditor.XML_BODY_ELEMENT);
            } else {
                // use the first element from the element list
                setParamElementname(elements.get(0));
            }
        } else {
            // elementName specified and element is enabled or not present, set to elementName
            setParamElementname(elementName);
        }
    }
620317
public boolean add(SeLionElement element) {
        // if already initialized, add the new elements to the front of the list.
        if (initialized) {
            CodeGeneratorLogger logger = CodeGeneratorLoggerFactory.getLogger();

            // info messages are only displayed after initialization happens
            if (isExactMatch(element.getElementClass())) {
                logger.info("Registering the element " + element + " which is now overwriting a pre-existing element.");
            } else {
                logger.info("Registering the element " + element + " as a valid element.");
            }

            SeLionElementSet elementSet = (SeLionElementSet) clone();
            clear();
            super.add(element);
            elementSet.stream().forEachOrdered(a -> super.add(a));
            return true;
        }
        return super.add(element);
    }
1055066
protected void adjustIndexMap(Doc[] elements) {
        for (int i = 0; i < elements.length; i++) {
            if (shouldAddToIndexMap(elements[i])) {
                String name = elements[i].name();
                char ch = (name.length()==0)?
                    '*' :
                    Character.toUpperCase(name.charAt(0));
                Character unicode = new Character(ch);
                List<Doc> list = indexmap.get(unicode);
                if (list == null) {
                    list = new ArrayList<Doc>();
                    indexmap.put(unicode, list);
                }
                list.add(elements[i]);
            }
        }
    }
507709
public VarSetBuilder members( IVarDef... members)
    {
    for( IVarDef member : members)
      {
      varSet_.addMember( member);
      }
    return this;
    }
275934
public void setNames(String[] names) throws IOException {
    if (names == null) {
      this.names = new String[0];
    } else {
      this.names = names;
    }
  }
914333
def AddMembers(self, *Members):
        
        self._Alter('ADDMEMBERS', ', '.join([x.Handle for x in Members]))
368985
public static String[] add(final String[] a, final String element) {
        if (N.isNullOrEmpty(a)) {
            return N.asArray(element);
        }

        final String[] newArray = new String[a.length + 1];

        copy(a, 0, newArray, 0, a.length);
        newArray[a.length] = element;

        return newArray;
    }