
com.belladati.sdk.impl.PaginatedIdListImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-java Show documentation
Show all versions of sdk-java Show documentation
The BellaDati SDK allows accessing a BellaDati server from 3rd-party applications using Java. This project contains the implementation for standard Java.
The newest version!
package com.belladati.sdk.impl;
import com.belladati.sdk.util.IdElement;
import com.belladati.sdk.util.PaginatedIdList;
abstract class PaginatedIdListImpl extends PaginatedListImpl implements PaginatedIdList {
public PaginatedIdListImpl(BellaDatiServiceImpl service, String relativeUrl, String field) {
super(service, relativeUrl, field);
}
@Override
public boolean contains(String id) {
for (T item : currentData) {
if (id.equals(item.getId())) {
return true;
}
}
return false;
}
@Override
public int indexOf(String id) {
for (int dataIndex = 0; dataIndex < currentData.size(); dataIndex++) {
T item = currentData.get(dataIndex);
if (id.equals(item.getId())) {
return getFirstLoadedIndex() + dataIndex;
}
}
return -1;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy