From fc0fa0d31d351acf7c6656c3990e0fec4468a6d7 Mon Sep 17 00:00:00 2001 From: amit2103 Date: Sat, 29 Jun 2019 21:19:52 +0530 Subject: [PATCH] [BAEL-14274] - Fixed article code for https://www.baeldung.com/java-groupingby-collector --- .../java_8_features/groupingby/Tuple.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 core-java-modules/core-java-8/src/main/java/com/baeldung/java_8_features/groupingby/Tuple.java diff --git a/core-java-modules/core-java-8/src/main/java/com/baeldung/java_8_features/groupingby/Tuple.java b/core-java-modules/core-java-8/src/main/java/com/baeldung/java_8_features/groupingby/Tuple.java new file mode 100644 index 0000000000..7a9f62341e --- /dev/null +++ b/core-java-modules/core-java-8/src/main/java/com/baeldung/java_8_features/groupingby/Tuple.java @@ -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() + "]"; + } +}