From 7f59d0b9de4536705b3122cb5a85d9c9f85846a3 Mon Sep 17 00:00:00 2001 From: bjculkin Date: Fri, 17 Mar 2017 08:52:13 -0400 Subject: Add toString/equals/hashCode/compareTo part 1 Adds utility methods to classes that need them. This covers the cli & component packages. --- .../utils/components/FileComponentRepository.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java b/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java index d69b794..6fd6177 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java +++ b/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java @@ -148,4 +148,30 @@ public class FileComponentRepository + pth.toString() + ". This component will not be loaded"); } } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("FileComponentRepository ["); + + if(components != null) { + builder.append("components="); + builder.append(components); + builder.append(", "); + } + + if(sourceDirectory != null) { + builder.append("sourceDirectory="); + builder.append(sourceDirectory); + } + + builder.append("]"); + + return builder.toString(); + } } \ No newline at end of file -- cgit v1.2.3