com.mmnaseri.utils.tuples.impl.DelegatingLabeledTuple Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tuples4j Show documentation
Show all versions of tuples4j Show documentation
Tiny framework for using tuples as first-class citizens in Java.
package com.mmnaseri.utils.tuples.impl;
import com.mmnaseri.utils.tuples.LabeledTuple;
import com.mmnaseri.utils.tuples.utils.FluentList;
import com.mmnaseri.utils.tuples.utils.FluentMap;
import java.util.List;
import java.util.function.Supplier;
import java.util.stream.Stream;
public class DelegatingLabeledTuple implements LabeledTuple {
private final LabeledTuple delegate;
public DelegatingLabeledTuple(final LabeledTuple delegate) {
this.delegate = delegate;
}
@Override
public List labels() {
return delegate.labels();
}
@Override
public int size() {
return delegate.size();
}
@Override
public Z get(final int index) {
return delegate.get(index);
}
@Override
public LabeledTuple change(final int index, final Supplier extends Z> value) {
return delegate.change(index, value);
}
@Override
public LabeledTuple drop(final int index) {
return delegate.drop(index);
}
@Override
public LabeledTuple relabel(final int index, final String newLabel) {
return delegate.relabel(index, newLabel);
}
@Override
public LabeledTuple extend(final X value) {
return delegate.extend(value);
}
@Override
public LabeledTuple extend(final Supplier value) {
return delegate.extend(value);
}
@Override
public FluentMap asMap() {
return delegate.asMap();
}
@Override
public Stream stream() {
return delegate.stream();
}
@Override
public FluentList asList() {
return delegate.asList();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy