edu.illinois.cs.cogcomp.lbj.coref.ir.solutions
Class SetSolution<T>

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.ir.solutions.SetSolution<T>
All Implemented Interfaces:
Solution, java.io.Serializable
Direct Known Subclasses:
ChunkSolution

public class SetSolution<T>
extends java.lang.Object
implements Solution, java.io.Serializable

A solution containing a set of objects of some type T

Author:
Eric Bengtson
See Also:
Serialized Form

Field Summary
private  java.util.Set<T> m_items
           
private static long serialVersionUID
           
 
Constructor Summary
SetSolution()
          Constructs an empty SetSolution.
SetSolution(java.util.Collection<T> items)
          Constructs a solution containing items as a set.
 
Method Summary
 java.util.Set<T> getItems()
          Gets the items.
 java.lang.String toString()
          Get a string representation of the items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

m_items

private java.util.Set<T> m_items
Constructor Detail

SetSolution

public SetSolution()
Constructs an empty SetSolution.


SetSolution

public SetSolution(java.util.Collection<T> items)
Constructs a solution containing items as a set.

Parameters:
items - The items (copied defensively into a set).
Method Detail

getItems

public java.util.Set<T> getItems()
Gets the items.

Returns:
An unmodifiable view of the items.

toString

public java.lang.String toString()
Get a string representation of the items.

Overrides:
toString in class java.lang.Object