1 17 package org.alfresco.jcr.item; 18 19 import java.util.List ; 20 21 import javax.jcr.Property; 22 import javax.jcr.PropertyIterator; 23 24 import org.alfresco.jcr.util.AbstractRangeIterator; 25 26 27 32 public class PropertyListIterator extends AbstractRangeIterator 33 implements PropertyIterator 34 { 35 private List <PropertyImpl> properties; 36 37 38 44 public PropertyListIterator(List <PropertyImpl> properties) 45 { 46 this.properties = properties; 47 } 48 49 52 public Property nextProperty() 53 { 54 long position = skip(); 55 PropertyImpl propertyImpl = properties.get((int)position); 56 return propertyImpl.getProxy(); 57 } 58 59 60 63 public long getSize() 64 { 65 return properties.size(); 66 } 67 68 71 public Object next() 72 { 73 return nextProperty(); 74 } 75 76 } 77 | Popular Tags |