PositionalDataSource.LoadInitialParams

public class PositionalDataSource.LoadInitialParams


Holder object for inputs to loadInitial.

Summary

Public fields

final @NonNull int

Defines page size acceptable for return values.

final @NonNull boolean

Defines whether placeholders are enabled, and whether the loaded total count will be ignored.

final @NonNull int

Requested number of items to load.

final @NonNull int

Initial load position requested.

Public constructors

LoadInitialParams(
    @NonNull int requestedStartPosition,
    @NonNull int requestedLoadSize,
    @NonNull int pageSize,
    @NonNull boolean placeholdersEnabled
)

Public fields

pageSize

@NonNull
public final @NonNull int pageSize

Defines page size acceptable for return values.

List of items passed to the callback must be an integer multiple of page size.

placeholdersEnabled

@NonNull
public final @NonNull boolean placeholdersEnabled

Defines whether placeholders are enabled, and whether the loaded total count will be ignored.

requestedLoadSize

@NonNull
public final @NonNull int requestedLoadSize

Requested number of items to load.

Note that this may be larger than available data.

requestedStartPosition

@NonNull
public final @NonNull int requestedStartPosition

Initial load position requested.

Note that this may not be within the bounds of your data set, it may need to be adjusted before you execute your load.

Public constructors

LoadInitialParams

@NonNull
public final LoadInitialParams(
    @NonNull int requestedStartPosition,
    @NonNull int requestedLoadSize,
    @NonNull int pageSize,
    @NonNull boolean placeholdersEnabled
)