org.robobinding.property.ArrayDataSet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robobinding Show documentation
Show all versions of robobinding Show documentation
A Presentation Model(MVVM) framework for the Android platform
The newest version!
package org.robobinding.property;
import org.robobinding.itempresentationmodel.DataSetChangeListener;
import org.robobinding.itempresentationmodel.RefreshableItemPresentationModelFactory;
/**
* @since 1.0
* @author Cheng Wei
*
*/
public class ArrayDataSet extends AbstractDataSet {
public ArrayDataSet(RefreshableItemPresentationModelFactory factory, AbstractGetSet> getSet) {
super(factory, getSet);
}
@Override
public int size() {
if (isDataSetNull())
return 0;
Object[] array = getDataSet();
return array.length;
}
@Override
public Object get(int position) {
Object[] array = getDataSet();
return array[position];
}
@Override
public void addListener(DataSetChangeListener listener) {
//not supported.
}
@Override
public void removeListener(DataSetChangeListener listener) {
//not supported.
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy