Class Concat

java.lang.Object
immutable.list.apps.assignment.Concat

public class Concat
extends java.lang.Object
Author:
__STUDENT_NAME__, Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
  • Constructor Summary

    Constructors 
    Constructor Description
    Concat()  
  • Method Summary

    Modifier and Type Method Description
    static <E> ImmutableList<E> concat​(ImmutableList<E> xs, ImmutableList<E> ys)
    Produces a ImmutableList which is equivalent to ys concatenated onto xs.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • concat

      public static <E> ImmutableList<E> concat​(ImmutableList<E> xs, ImmutableList<E> ys)
      Produces a ImmutableList which is equivalent to ys concatenated onto xs. For example, if xs is ["four", "score", "and"] and ys is ["seven", "years", "ago"] this method should return the ImmutableList ["four", "score", "and", "seven", "years", "ago"].
      Type Parameters:
      E - the class of Objects in the ImmutableLists
      Parameters:
      xs - the first list
      ys - the second list
      Returns:
      the list that is the contents of xs followed by the contents of ys