Copy the given Enumeration into a {@code String} array. The Enumeration must contain
{@code String} elements only.

@param enumeration the Enumeration to copy
@return the {@code String} array
763762
public static String[] toStringArray(final Enumeration<String> enumeration) {
    return StringUtils.toStringArray(Collections.list(enumeration));
  }
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;
    }
528191
private EnumElement readEnumElement(Location location, String documentation) {
    String name = reader.readName();

    ImmutableList.Builder<EnumConstantElement> constants = ImmutableList.builder();
    ImmutableList.Builder<OptionElement> options = ImmutableList.builder();
    reader.require('{');
    while (true) {
      String valueDocumentation = reader.readDocumentation();
      if (reader.peekChar('}')) break;

      Object declared = readDeclaration(valueDocumentation, Context.ENUM);
      if (declared instanceof EnumConstantElement) {
        constants.add((EnumConstantElement) declared);
      } else if (declared instanceof OptionElement) {
        options.add((OptionElement) declared);
      }
    }
    return new EnumElement(location, name, documentation, options.build(), constants.build());
  }
877901
public Enumeration<String> getElements() {
        AttributeNameEnumeration elements = new AttributeNameEnumeration();
        elements.addElement(POLICIES);

        return (elements.elements());
    }
764361
public Enumeration<String> getElements() {
        AttributeNameEnumeration elements = new AttributeNameEnumeration();
        elements.addElement(ISSUER);
        return elements.elements();
    }
1349086
public static <T> ArrayList<T> newArrayList(Enumeration<T> enumration) {
		return (ArrayList<T>) list(false, enumration);
	}
844311
public static <E> Iterable<E> wrapEnumeration(Enumeration<E> enumeration) {
        return new IterableEnumeration<E>(enumeration);
    }
1149798
public Enumeration<String> getElements() {
        AttributeNameEnumeration elements = new AttributeNameEnumeration();
        elements.addElement(PERMITTED_SUBTREES);
        elements.addElement(EXCLUDED_SUBTREES);

        return (elements.elements());
    }
1223949
public void setEnumerationValues(java.util.Collection<EnumerationValue> enumerationValues) {
        if (enumerationValues == null) {
            this.enumerationValues = null;
            return;
        }

        this.enumerationValues = new java.util.ArrayList<EnumerationValue>(enumerationValues);
    }
911303
public static <T> Expiring<T> of(Enumeration<T> enumeration) {
		return of(Iterators.forEnumeration(enumeration));
	}
558885
public Enumeration<String> getElements () {
        AttributeNameEnumeration elements = new AttributeNameEnumeration();
        for( int i=0; i<NAMES.length; i++ ) {
            elements.addElement(NAMES[i]);
        }
        return (elements.elements());
    }
732283
public static Collection map(Mapper mapper, Enumeration en, boolean allowNull) {
        ArrayList l = new ArrayList();
        while (en.hasMoreElements()) {
            Object o = mapper.map(en.nextElement());
            if (allowNull || o != null) {
                l.add(o);
            }
        }
        return l;
    }
1347335
public Enumeration<String> getElements() {
        AttributeNameEnumeration elements = new AttributeNameEnumeration();
        elements.addElement(REASON);

        return elements.elements();
    }
461086
public static <T> Iterable<T> toIterable(Enumeration<T> in) {
        List<T> out = new LinkedList<T>();
        while(in.hasMoreElements()) {
            out.add(in.nextElement());
        }
        return out;
    }
381230
public static <E> Iterator<E> asIterator(Enumeration<E> e) {
		return new EnumerationIter<E>(e);
	}
51135
public static <E> Iterator<E> toIterator(Enumeration<E> enumeration) {
        return new EnumerationIterator<E>(enumeration);
    }
89351
public Enumeration<String> getElements() {
        AttributeNameEnumeration elements = new AttributeNameEnumeration();
        elements.addElement(KEY_ID);

        return (elements.elements());
    }