Android Open Source - sqlite-provider Groups

From Project

Back to project page sqlite-provider.


The source code is released under:

Apache License

If you think the Android project sqlite-provider listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.novoda.sqliteprovider.demo.domain;
//  w ww . ja v a 2s  .c o  m
import java.util.Iterator;
import java.util.List;
import java.util.Locale;

public class Groups implements Iterable<Groups.Group> {

    private final List<Group> groups;

    public Groups(List<Group> groups) {
        this.groups = groups;

    public Group get(int position) {
        return groups.get(position);

    public Iterator<Group> iterator() {
        return groups.iterator();

    public static class Group {
        private final double total;
        private final int shopId;

        public Group(double total, int shopId) {
   = total;
            this.shopId = shopId;

        public int getShopId() {
            return shopId;

        public String getFormattedTotal() {
            return String.format(Locale.UK, "%.2f,", total);

        public static Group getNullSafeGroup() {
            return new Group(0, 0);


Java Source Code List