Android Open Source - cnp User






From Project

Back to project page cnp.

License

The source code is released under:

MIT License

If you think the Android project cnp 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.urucas.copynpaste.model;
/*from   w  w  w.j  ava 2s .  com*/
import java.util.ArrayList;

public class User {

  private int id;
  private String imei, code;
  private ArrayList<Post> posts;
  
  public User(int id, String imei, String code) {
    this.id = id;
    this.imei = imei;
    this.code = code;
    this.posts = new ArrayList<Post>();
  }
  
  public int getId() {
    return id;
  }
  
  public ArrayList<Post> addPost(Post post) {
    posts.add(post);
    return posts;
  }
  
  public ArrayList<Post> addPosts(ArrayList<Post> _posts) {
    int len = _posts.size();
    for(int i=0; i < len; i++) {
      posts.add(_posts.get(i));
    }
    return posts;
  }
  
  public ArrayList<Post> getPosts() {
    return posts;
  }

  public String getCode() {
    return code;
  }

  public String getImei() {
    return imei;
  }
}




Java Source Code List

com.urucas.copynpaste.CNPApplication.java
com.urucas.copynpaste.activities.HomeActivity.java
com.urucas.copynpaste.activities.SplashActivity.java
com.urucas.copynpaste.adapters.PostsAdapter.java
com.urucas.copynpaste.callbacks.PostsCallback.java
com.urucas.copynpaste.callbacks.UserCallback.java
com.urucas.copynpaste.controllers.ApiController.java
com.urucas.copynpaste.model.Post.java
com.urucas.copynpaste.model.User.java
com.urucas.copynpaste.parser.PostParser.java
com.urucas.copynpaste.parser.PostsParser.java
com.urucas.copynpaste.parser.UserParser.java
com.urucas.services.JSONRequestTaskHandler.java
com.urucas.services.JSONRequestTask.java
com.urucas.services.JSONRequest.java
com.urucas.services.RequestTaskHandler.java
com.urucas.services.RequestTask.java
com.urucas.utils.Utils.java