com.sun.jini.reggie
Class RegistrarImpl.ClassItemIter

java.lang.Object
  extended by com.sun.jini.reggie.RegistrarImpl.ItemIter
      extended by com.sun.jini.reggie.RegistrarImpl.ClassItemIter
Enclosing class:
RegistrarImpl

private class RegistrarImpl.ClassItemIter
extends RegistrarImpl.ItemIter

Iterate over all matching Items by entry class, dups possible.


Field Summary
private  int classidx
          Current index into entryClasses
private  EntryClass eclass
          Entry class to match on
private  Iterator iter
          Values iterator for current HashMap
private  int svcidx
          Current index into svcs
private  ArrayList svcs
          SvcRegs obtained from iter or serviceByEmptyAttr
 
Fields inherited from class com.sun.jini.reggie.RegistrarImpl.ItemIter
dupsPossible, now, reg, tmpl
 
Constructor Summary
RegistrarImpl.ClassItemIter(Template tmpl)
          tmpl.serviceID == null and tmpl.serviceTypes is empty and tmpl.attributeSetTemplates is non-empty
 
Method Summary
protected  void step()
          Set reg to the next matching element, or null if none
private  boolean stepClass()
          Step to the next matching entry class, if any, reset iter using the HashMap for the last field of the class (and reset (svcs and svcidx if the entry class has no fields), and return false if everything exhausted.
private  boolean stepValue()
          Step to the next HashMap value, if any, reset svcs and svcidx, and return false if everything exhausted.
 
Methods inherited from class com.sun.jini.reggie.RegistrarImpl.ItemIter
hasNext, next, nextReg
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eclass

private final EntryClass eclass
Entry class to match on


classidx

private int classidx
Current index into entryClasses


iter

private Iterator iter
Values iterator for current HashMap


svcs

private ArrayList svcs
SvcRegs obtained from iter or serviceByEmptyAttr


svcidx

private int svcidx
Current index into svcs

Constructor Detail

RegistrarImpl.ClassItemIter

public RegistrarImpl.ClassItemIter(Template tmpl)
tmpl.serviceID == null and tmpl.serviceTypes is empty and tmpl.attributeSetTemplates is non-empty

Method Detail

step

protected void step()
Set reg to the next matching element, or null if none

Specified by:
step in class RegistrarImpl.ItemIter

stepValue

private boolean stepValue()
Step to the next HashMap value, if any, reset svcs and svcidx, and return false if everything exhausted.


stepClass

private boolean stepClass()
Step to the next matching entry class, if any, reset iter using the HashMap for the last field of the class (and reset (svcs and svcidx if the entry class has no fields), and return false if everything exhausted.



Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.