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

yakworks.commons.model.SimplePagedList.groovy Maven / Gradle / Ivy

There is a newer version: 3.14
Show newest version
/*
* Copyright 2022 original authors
* SPDX-License-Identifier: Apache-2.0
*/
package yakworks.commons.model

import groovy.transform.CompileStatic

/**
 * Simple Paged List that delegates to a list and has the totalCount.
 * Example would be for results from server where  this list hold 10 results with totalCount = 100
 * Intentionally simple with no tracking for what page its on etc..
 */
@CompileStatic
class SimplePagedList implements TotalCount {
    @Delegate List results

    SimplePagedList(List results, int tot) {
        this.results = results
        setTotalCount(tot)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy