// Path: app/src/main/java/info/izumin/android/sunazuri/domain/entity/AuthorizedUser.java
// public class AuthorizedUser {
//     public static final String TAG = AuthorizedUser.class.getSimpleName();
// 
//     public final long id;
//     public final String name;
//     public final String screenName;
//     public final Date createdAt;
//     public final Date updatedAt;
//     public final String icon;
//     public final String email;
// 
//     public final AccessToken token;
// 
//     public AuthorizedUser(long id,
//                           String name,
//                           String screenName,
//                           Date createdAt,
//                           Date updatedAt,
//                           String icon,
//                           String email,
//                           AccessToken token) {
//         this.id = id;
//         this.name = name;
//         this.screenName = screenName;
//         this.createdAt = createdAt;
//         this.updatedAt = updatedAt;
//         this.icon = icon;
//         this.email = email;
//         this.token = token;
//     }
// }
// 
// Path: app/src/main/java/info/izumin/android/sunazuri/domain/entity/Team.java
// public class Team {
//     public static final String TAG = Team.class.getSimpleName();
// 
//     public final String name;
//     public final String privacy;
//     public final String description;
//     public final String icon;
//     public final long userId;
// 
//     public final TeamStats stats;
// 
//     public Team(String name,
//                 String privacy,
//                 String description,
//                 String icon,
//                 long userId, TeamStats stats) {
//         this.name = name;
//         this.privacy = privacy;
//         this.description = description;
//         this.icon = icon;
//         this.userId = userId;
//         this.stats = stats;
//     }
// 
//     public Team(String name,
//                 String privacy,
//                 String description,
//                 String icon,
//                 long userId) {
//         this(name, privacy, description, icon, userId, null);
//     }
// }
// 
// Path: app/src/main/java/info/izumin/android/sunazuri/domain/repository/TeamsRepository.java
// public interface TeamsRepository {
//     Single<List<Team>> get(AuthorizedUser user);
// }


import info.izumin.android.sunazuri.domain.entity.AuthorizedUser;
import info.izumin.android.sunazuri.domain.entity.Team;
import info.izumin.android.sunazuri.domain.repository.TeamsRepository;
import info.izumin.android.sunazuri.infrastructure.entity.mapper.AuthorizedUserMapper;
import info.izumin.android.sunazuri.infrastructure.entity.mapper.TeamMapper;
import rx.Single;
import javax.inject.Inject;
import java.util.List;
package info.izumin.android.sunazuri.infrastructure.repository.source.team;



/**
 * Created by izumin on 5/13/2016 AD.
 */
class TeamsRepositoryImpl implements TeamsRepository {
    public static final String TAG = TeamsRepositoryImpl.class.getSimpleName();

    private final TeamsDataSourceFactory dataSourceFactory;
    private final AuthorizedUserMapper authorizedUserMapper;
    private final TeamMapper teamMapper;

    @Inject
    TeamsRepositoryImpl(TeamsDataSourceFactory dataSourceFactory,
                        AuthorizedUserMapper authorizedUserMapper,
                        TeamMapper teamMapper) {
        this.dataSourceFactory = dataSourceFactory;
        this.authorizedUserMapper = authorizedUserMapper;
        this.teamMapper = teamMapper;
    }

    @Override
// Path: app/src/main/java/info/izumin/android/sunazuri/domain/entity/AuthorizedUser.java
// public class AuthorizedUser {
//     public static final String TAG = AuthorizedUser.class.getSimpleName();
// 
//     public final long id;
//     public final String name;
//     public final String screenName;
//     public final Date createdAt;
//     public final Date updatedAt;
//     public final String icon;
//     public final String email;
// 
//     public final AccessToken token;
// 
//     public AuthorizedUser(long id,
//                           String name,
//                           String screenName,
//                           Date createdAt,
//                           Date updatedAt,
//                           String icon,
//                           String email,
//                           AccessToken token) {
//         this.id = id;
//         this.name = name;
//         this.screenName = screenName;
//         this.createdAt = createdAt;
//         this.updatedAt = updatedAt;
//         this.icon = icon;
//         this.email = email;
//         this.token = token;
//     }
// }
// 
// Path: app/src/main/java/info/izumin/android/sunazuri/domain/entity/Team.java
// public class Team {
//     public static final String TAG = Team.class.getSimpleName();
// 
//     public final String name;
//     public final String privacy;
//     public final String description;
//     public final String icon;
//     public final long userId;
// 
//     public final TeamStats stats;
// 
//     public Team(String name,
//                 String privacy,
//                 String description,
//                 String icon,
//                 long userId, TeamStats stats) {
//         this.name = name;
//         this.privacy = privacy;
//         this.description = description;
//         this.icon = icon;
//         this.userId = userId;
//         this.stats = stats;
//     }
// 
//     public Team(String name,
//                 String privacy,
//                 String description,
//                 String icon,
//                 long userId) {
//         this(name, privacy, description, icon, userId, null);
//     }
// }
// 
// Path: app/src/main/java/info/izumin/android/sunazuri/domain/repository/TeamsRepository.java
// public interface TeamsRepository {
//     Single<List<Team>> get(AuthorizedUser user);
// }


// Path: app/src/main/java/info/izumin/android/sunazuri/infrastructure/repository/source/team/TeamsRepositoryImpl.java
import info.izumin.android.sunazuri.domain.entity.AuthorizedUser;
import info.izumin.android.sunazuri.domain.entity.Team;
import info.izumin.android.sunazuri.domain.repository.TeamsRepository;
import info.izumin.android.sunazuri.infrastructure.entity.mapper.AuthorizedUserMapper;
import info.izumin.android.sunazuri.infrastructure.entity.mapper.TeamMapper;
import rx.Single;
import javax.inject.Inject;
import java.util.List;

package info.izumin.android.sunazuri.infrastructure.repository.source.team;



/**
 * Created by izumin on 5/13/2016 AD.
 */
class TeamsRepositoryImpl implements TeamsRepository {
    public static final String TAG = TeamsRepositoryImpl.class.getSimpleName();

    private final TeamsDataSourceFactory dataSourceFactory;
    private final AuthorizedUserMapper authorizedUserMapper;
    private final TeamMapper teamMapper;

    @Inject
    TeamsRepositoryImpl(TeamsDataSourceFactory dataSourceFactory,
                        AuthorizedUserMapper authorizedUserMapper,
                        TeamMapper teamMapper) {
        this.dataSourceFactory = dataSourceFactory;
        this.authorizedUserMapper = authorizedUserMapper;
        this.teamMapper = teamMapper;
    }

    @Override
    public Single<List<Team>> get(AuthorizedUser user) {