All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.robobinding.property.ArrayDataSetProperty Maven / Gradle / Ivy

package org.robobinding.property;

import org.robobinding.itempresentationmodel.ItemPresentationModelFactory;

/**
 * 
 * @since 1.0
 * @version $Revision: 1.0 $
 * @author Robert Taylor
 */
public class ArrayDataSetProperty extends AbstractDataSetProperty {
	public ArrayDataSetProperty(ObservableBean observableBean, PropertyAccessor propertyAccessor, ItemPresentationModelFactory factory) {
		super(observableBean, propertyAccessor, factory);
	}

	@Override
	public int size() {
		if (isDataSetNull())
			return 0;

		Object[] array = getDataSet();
		return array.length;
	}

	@Override
	public Object getItem(int position) {
		Object[] array = getDataSet();
		return array[position];
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy