All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.solovyev.common.text.ListMapper Maven / Gradle / Ivy

/*
 * Copyright 2013 serso aka se.solovyev
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * ---------------------------------------------------------------------
 * Contact details
 *
 * Email: [email protected]
 * Site:  http://se.solovyev.org
 */

package org.solovyev.common.text;

import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;

public class ListMapper extends CollectionMapper, E> {

	/*
	**********************************************************************
	*
	*                           CONSTRUCTORS
	*
	**********************************************************************
	*/

	private ListMapper(@Nonnull Parser parser, @Nonnull Formatter formatter, @Nonnull String delimiter) {
		super(parser, formatter, delimiter);
	}

	private ListMapper(@Nonnull Parser parser, @Nonnull Formatter formatter) {
		super(parser, formatter);
	}

	private ListMapper(@Nonnull Mapper mapper, @Nonnull String delimiter) {
		super(mapper, delimiter);
	}

	private ListMapper(@Nonnull Mapper mapper) {
		super(mapper);
	}

	@Nonnull
	public static  ListMapper newInstance(@Nonnull Parser parser, @Nonnull Formatter formatter, @Nonnull String delimiter) {
		return new ListMapper(parser, formatter, delimiter);
	}

	@Nonnull
	public static  ListMapper newInstance(@Nonnull Parser parser, @Nonnull Formatter formatter) {
		return new ListMapper(parser, formatter);
	}

	@Nonnull
	public static  ListMapper newInstance(@Nonnull Mapper mapper, @Nonnull String delimiter) {
		return new ListMapper(mapper, delimiter);
	}

	@Nonnull
	public static  ListMapper newInstance(@Nonnull Mapper mapper) {
		return new ListMapper(mapper);
	}

	/*
	**********************************************************************
	*
	*                           METHODS
	*
	**********************************************************************
	*/

	@Nonnull
	@Override
	protected List newCollection() {
		return new ArrayList();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy