org.appdapter.api.registry
Interface SimpleRegistry

All Superinterfaces:
Registry
All Known Subinterfaces:
VerySimpleRegistry
All Known Implementing Classes:
BasicRegistry

public interface SimpleRegistry
extends Registry

Additional Registry methods which simply ther process of looking for a single matching object, or all matching objects, for clients who do not wish to work directly with Finders and Receivers.

Author:
Stu B.

Method Summary
<OT> List<OT>
findAllMatches(Class<OT> objClaz, Pattern p, int minAllowed, int maxAllowed)
           
<OT> OT
findOptionalFirstMatch(Class<OT> objClaz, Pattern p)
           
<OT> OT
findOptionalUniqueMatch(Class<OT> objClaz, Pattern p)
           
<OT> OT
findRequiredUniqueMatch(Class<OT> objClaz, Pattern p)
           
 
Methods inherited from interface org.appdapter.api.registry.Registry
getFinder, registerObject
 

Method Detail

findOptionalFirstMatch

<OT> OT findOptionalFirstMatch(Class<OT> objClaz,
                               Pattern p)
Returns:
any match found or null, with no uniqueness constraints, no problem mon.

findRequiredUniqueMatch

<OT> OT findRequiredUniqueMatch(Class<OT> objClaz,
                                Pattern p)
                           throws Exception
Returns:
exactly one unique match or exception is thrown
Throws:
Exception

findOptionalUniqueMatch

<OT> OT findOptionalUniqueMatch(Class<OT> objClaz,
                                Pattern p)
                           throws Exception
Returns:
null if nothing, or single unique match, but throws on multi-match
Throws:
Exception

findAllMatches

<OT> List<OT> findAllMatches(Class<OT> objClaz,
                             Pattern p,
                             int minAllowed,
                             int maxAllowed)
                        throws Exception
Returns:
all matches, but throws if result size would be outside of inclusive-bounds [minAllowed, maxAllowed]
Throws:
Exception


Copyright © 2010-2012. All Rights Reserved.