3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-14 11:15:51 +00:00

ListMessage: Implement toString().

This commit is contained in:
Andreas Schildbach 2019-02-05 12:48:32 +01:00
parent 50df97c98a
commit 2d943838dd

View File

@ -23,6 +23,8 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import com.google.common.base.MoreObjects;
/**
* <p>Abstract superclass of classes with list based payload, ie InventoryMessage and GetDataMessage.</p>
*
@ -129,4 +131,11 @@ public abstract class ListMessage extends Message {
public int hashCode() {
return items.hashCode();
}
@Override
public String toString() {
MoreObjects.ToStringHelper helper = MoreObjects.toStringHelper(this);
helper.addValue(items);
return helper.toString();
}
}