View Javadoc

1   package org.sourceforge.jemm.collections.internal;
2   
3   import org.sourceforge.jemm.client.shared.ValueEncoder;
4   import org.sourceforge.jemm.lifecycle.TypeResponse;
5   import org.sourceforge.jemm.lifecycle.ValueVisitor;
6   
7   /**
8    * HashContainer ContainsResult, three options
9    * 1)  found = true, possibles = null  ( successfully found (exact match))
10   * 2)  found = false, possibles = null ( definately not in set )
11   * 3)  added = false, possibles != null ( uncertain, possible matches returned )
12   * 
13   * @author Rory Graves
14   *
15   */
16  public class SizeResponse extends TypeResponse<SizeResponse> {
17  	private static final long serialVersionUID = 1L;
18  
19  	private final int size;
20  
21  	public SizeResponse(int size) {
22  		this.size = size;
23  	}
24  
25  	@Override
26  	public SizeResponse encode(ValueEncoder encoder) {
27  		return this;
28  	}
29  
30  	public int getSize() {
31  		return size;
32  	}
33  
34  	@Override
35  	public void visit(ValueVisitor visitor) {}
36  }