Skip to content
Snippets Groups Projects
Commit ebed2571 authored by ribeaudc's avatar ribeaudc
Browse files

change: - Add a 'toString' method.

SVN: 7570
parent 4c66bd31
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,8 @@ import java.util.LinkedHashMap; ...@@ -23,6 +23,8 @@ import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;
/** /**
* A table of rows of type <code>E</code> with random access via a key of type <code>K</code>. * A table of rows of type <code>E</code> with random access via a key of type <code>K</code>.
* *
...@@ -188,6 +190,16 @@ public class TableMap<K, E> implements Iterable<E> ...@@ -188,6 +190,16 @@ public class TableMap<K, E> implements Iterable<E>
return Collections.unmodifiableSet(map.keySet()); return Collections.unmodifiableSet(map.keySet());
} }
//
// Object
//
@Override
public final String toString()
{
return ToStringBuilder.reflectionToString(this);
}
/** /**
* Creates an iterator of the rows in the order they have been added. Removing is not supported. * Creates an iterator of the rows in the order they have been added. Removing is not supported.
*/ */
......
...@@ -23,6 +23,8 @@ import java.util.Map; ...@@ -23,6 +23,8 @@ import java.util.Map;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import java.util.Set; import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;
/** /**
* A table of rows of type <code>E</code> with random access via a key of type <code>K</code> * A table of rows of type <code>E</code> with random access via a key of type <code>K</code>
* where the key does not have to be unique. * where the key does not have to be unique.
...@@ -146,6 +148,16 @@ public class TableMapNonUniqueKey<K, E> implements Iterable<E> ...@@ -146,6 +148,16 @@ public class TableMapNonUniqueKey<K, E> implements Iterable<E>
return map.get(key); return map.get(key);
} }
//
// Object
//
@Override
public final String toString()
{
return ToStringBuilder.reflectionToString(this);
}
/** /**
* Creates an iterator of the rows. Removing is not supported. * Creates an iterator of the rows. Removing is not supported.
* <p> * <p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment