Merge pull request #7213 from amit2103/BAEL-14274-17
[BAEL-14274] - Fixed article code for https://www.baeldung.com/java-g…
This commit is contained in:
commit
ec0f63404c
|
@ -0,0 +1,34 @@
|
||||||
|
package com.baeldung.java_8_features.groupingby;
|
||||||
|
|
||||||
|
public class Tuple {
|
||||||
|
|
||||||
|
private BlogPostType type;
|
||||||
|
private String author;
|
||||||
|
|
||||||
|
public Tuple(BlogPostType type, String author) {
|
||||||
|
super();
|
||||||
|
this.type = type;
|
||||||
|
this.author = author;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlogPostType getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(BlogPostType type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAuthor() {
|
||||||
|
return author;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuthor(String author) {
|
||||||
|
this.author = author;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Tuple [type=" + type + ", author=" + author + ", getType()=" + getType() + ", getAuthor()=" + getAuthor() + ", getClass()=" + getClass() + ", hashCode()=" + hashCode() + ", toString()=" + super.toString() + "]";
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue