gumbo.graphic.probe
Class PickResult

java.lang.Object
  |
  +--gumbo.graphic.probe.PickResult

public class PickResult
extends java.lang.Object

The immutable result object of a pick operation. Allows pick operations to return as much information as possible about the pick hits.

Version:
$Revision: 1.2 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Constructor Summary
PickResult(java.util.Set specs, java.util.List hits)
          Creates an instance, with parameters protected from shallow mutation.
 
Method Summary
 java.util.List getHits()
          Gets the pick hit results.
 java.util.Set getSpecs()
          Gets the pick specification flags.
 int hitCount()
          Gets the number of hits in this pick result.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PickResult

public PickResult(java.util.Set specs,
                  java.util.List hits)
Creates an instance, with parameters protected from shallow mutation.

Parameters:
specs - The value of the flags (Object) used to specify the pick operation. Typically, Picks.PICK_??? and Picks.HIT_???. Never null. PICK_??? flag compliance is mandatory. HIT_??? flag compliance is optional.
hits - The value of the hit results (HitResult). Possibly empty (no hits) but never null. The contents must conform to pickFlags.
Method Detail

getSpecs

public java.util.Set getSpecs()
Gets the pick specification flags.

Returns:
Immutable set of spec flags (Object). Never null.

hitCount

public int hitCount()
Gets the number of hits in this pick result.

Returns:
Hit count. Zero if no hits.

getHits

public java.util.List getHits()
Gets the pick hit results.

Returns:
Immutable list of hit results (HitResult). Never null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object