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

com.github.dakusui.valid8j_pcond.fluent.ListHolder Maven / Gradle / Ivy

The newest version!
package com.github.dakusui.valid8j_pcond.fluent;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;


/**
 * A list that are not printed in a report created by {@link com.github.dakusui.valid8j_pcond.validator.ReportComposer}.
 * An instance of this class should be used together with a statement created by {@link Statement#createPredicateForAllOf(Statement[])} method.
 *
 * @param  Type of elements in this list.
 * @see com.github.dakusui.valid8j_pcond.validator.ReportComposer
 * @see Statement#createPredicateForAllOf(Statement[])
 */
public class ListHolder extends ArrayList implements ValueHolder {
  private ListHolder(Collection collection) {
    this.addAll(collection);
  }

  /**
   * A method to create an instance of this class.
   *
   * @param list A list wrapped by the returned object.
   * @return An instance of {@link ListHolder} that wraps a given list.
   * @param  Type of elements in the passed and returned list.
   */
  public static  List fromList(List list) {
    return new ListHolder<>(list);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy