-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from mmnaseri/release-v1.1.0
Release v1.1.0
- Loading branch information
Showing
17 changed files
with
916 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
tuples4j/src/main/java/com/mmnaseri/utils/tuples/impl/DelegatingLabeledTuple.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
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<Z> implements LabeledTuple<Z> { | ||
|
||
private final LabeledTuple<Z> delegate; | ||
|
||
public DelegatingLabeledTuple(final LabeledTuple<Z> delegate) { | ||
this.delegate = delegate; | ||
} | ||
|
||
@Override | ||
public List<String> 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<Z> change(final int index, final Supplier<? extends Z> value) { | ||
return delegate.change(index, value); | ||
} | ||
|
||
@Override | ||
public LabeledTuple<Z> drop(final int index) { | ||
return delegate.drop(index); | ||
} | ||
|
||
@Override | ||
public LabeledTuple<Z> relabel(final int index, final String newLabel) { | ||
return delegate.relabel(index, newLabel); | ||
} | ||
|
||
@Override | ||
public <X extends Z> LabeledTuple<Z> extend(final X value) { | ||
return delegate.extend(value); | ||
} | ||
|
||
@Override | ||
public <X extends Z> LabeledTuple<Z> extend(final Supplier<X> value) { | ||
return delegate.extend(value); | ||
} | ||
|
||
@Override | ||
public FluentMap<String, Z> asMap() { | ||
return delegate.asMap(); | ||
} | ||
|
||
@Override | ||
public Stream<Z> stream() { | ||
return delegate.stream(); | ||
} | ||
|
||
@Override | ||
public FluentList<Z> asList() { | ||
return delegate.asList(); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
tuples4j/src/main/java/com/mmnaseri/utils/tuples/impl/DelegatingTuple.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.mmnaseri.utils.tuples.impl; | ||
|
||
import com.mmnaseri.utils.tuples.Tuple; | ||
import com.mmnaseri.utils.tuples.utils.FluentList; | ||
|
||
import java.util.function.Supplier; | ||
import java.util.stream.Stream; | ||
|
||
public class DelegatingTuple<Z> implements Tuple<Z> { | ||
|
||
private final Tuple<Z> delegate; | ||
|
||
public DelegatingTuple(Tuple<Z> delegate) { | ||
this.delegate = delegate; | ||
} | ||
|
||
@Override | ||
public int size() { | ||
return delegate.size(); | ||
} | ||
|
||
@Override | ||
public Z get(final int index) { | ||
return delegate.get(index); | ||
} | ||
|
||
@Override | ||
public Tuple<Z> change(final int index, final Supplier<? extends Z> value) { | ||
return delegate.change(index, value); | ||
} | ||
|
||
@Override | ||
public Tuple<Z> drop(final int index) { | ||
return delegate.drop(index); | ||
} | ||
|
||
@Override | ||
public <X extends Z> Tuple<Z> extend(final Supplier<X> value) { | ||
return delegate.extend(value); | ||
} | ||
|
||
@Override | ||
public Stream<Z> stream() { | ||
return delegate.stream(); | ||
} | ||
|
||
@Override | ||
public FluentList<Z> asList() { | ||
return delegate.asList(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.