blob: a024630e4208aff02dea5aabff2366f0c04d2650 [file] [log] [blame]
/*
* Copyright (c) 2012 Google Inc.
*
* All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse
* Public License v1.0 which accompanies this distribution, and is available at
*
* http://www.eclipse.org/legal/epl-v10.html
*/
package com.google.eclipse.protobuf.util;
import java.util.List;
import com.google.inject.Singleton;
/**
* Utility methods related to <code>{@link List}</code>s of {@code String}s.
*
* @author alruiz@google.com (Alex Ruiz)
*/
@Singleton public class StringLists {
/**
* Returns an array containing all of the elements in the given list in proper sequence (from first to last element.)
* @param list the given list.
* @return an array containing all of the elements in the given list in proper sequence.
*/
public String[] toArray(List<String> list) {
return list.toArray(new String[list.size()]);
}
}