@Override public C.List<T> append(C.List<T> list) { return appendList(list); }
@Override public C.List<T> append(C.List<T> list) { return appendList(list); }
@Override @SuppressWarnings("unchecked") public C.List<T> append(Collection<? extends T> collection) { if (collection instanceof C.List) { return appendList((C.List<T>) collection); } else { return unLazyAppend(collection); } }
protected C.ReversibleSequence<T> appendReversibleSeq(C.ReversibleSequence<T> seq) { if (seq instanceof C.List) { return appendList((C.List<T>) seq); } // TODO support lazy append reversible sequence return unLazyAppend(seq); }
@Override @SuppressWarnings("unchecked") public C.List<T> append(Collection<? extends T> collection) { if (collection instanceof C.List) { return appendList((C.List<T>) collection); } else { return unLazyAppend(collection); } }
protected C.ReversibleSequence<T> appendReversibleSeq(C.ReversibleSequence<T> seq) { if (seq instanceof C.List) { return appendList((C.List<T>) seq); } // TODO support lazy append reversible sequence return unLazyAppend(seq); }
@Override public C.Sequence<T> append(C.Sequence<? extends T> seq) { if (seq instanceof C.List) { return appendList((C.List<T>) seq); } if (isLazy()) { return CompositeSeq.of(this, seq); } return unLazyAppend(seq); }
@Override public C.Sequence<T> append(C.Sequence<? extends T> seq) { if (seq instanceof C.List) { return appendList((C.List<T>) seq); } if (isLazy()) { return CompositeSeq.of(this, seq); } return unLazyAppend(seq); }
@Override @SuppressWarnings("unchecked") public C.Sequence<T> append(Iterable<? extends T> iterable) { if (iterable instanceof C.List) { return appendList((C.List<T>) iterable); } else if (iterable instanceof C.Sequence) { return append((C.Sequence<T>) iterable); } else if (iterable instanceof Collection) { return append((Collection<? extends T>) iterable); } else if (isLazy()) { return CompositeSeq.of(this, IterableSeq.of(iterable)); } else { return unLazyAppend(iterable); } }
@Override @SuppressWarnings("unchecked") public C.Sequence<T> append(Iterable<? extends T> iterable) { if (iterable instanceof C.List) { return appendList((C.List<T>) iterable); } else if (iterable instanceof C.Sequence) { return append((C.Sequence<T>) iterable); } else if (iterable instanceof Collection) { return append((Collection<? extends T>) iterable); } else if (isLazy()) { return CompositeSeq.of(this, IterableSeq.of(iterable)); } else { return unLazyAppend(iterable); } }