Android Open Source - ara-twitter Id






From Project

Back to project page ara-twitter.

License

The source code is released under:

Apache License

If you think the Android project ara-twitter 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.bakingcode.io.twitter.model;
/*from w ww.j a v a2 s. c  o  m*/
import java.io.Serializable;

/**
 * Id holds a user identifier that can be expressed as a long or/and as an integer
 */
public class Id implements Serializable {

  /**
   * Serial Id
   */
  private static final long serialVersionUID = 57029327663780150L;

  // ///////////////////////////////////////////////////////////////////////////
  // Fields
  // ///////////////////////////////////////////////////////////////////////////
  
  /**
   * The long representation
   */
  private long id;
  
  /**
   * The string representation
   */
  private String idStr;
  
  // ///////////////////////////////////////////////////////////////////////////
  // Constructors
  // ///////////////////////////////////////////////////////////////////////////
  
  /**
   * Constructor from long
   * @param id the user identifier as a long
   */
  public Id(long id) {
    
    this.id = id;
    this.idStr = String.valueOf(id);
    
  }
  
  /**
   * Constructor from string
   * @param idStr the user identifier as a string
   */
  public Id(String idStr) {
    this.id = Long.parseLong(idStr);
    this.idStr = idStr;
  }    
  
  // ///////////////////////////////////////////////////////////////////////////
  // Get & Set
  // ///////////////////////////////////////////////////////////////////////////

  /**
   * Get the identifier as a long
   * @return the identifier as a long
   */
  public long getId() {
    return id;
  }

  /**
   * Set the identifier as a long
   * @param id the identifier as a long
   */
  public void setId(long id) {
    this.id = id;
  }

  /**
   * Get the identifier as a string
   * @return the identifier as a string
   */
  public String getIdStr() {
    return idStr;
  }

  /**
   * Set the identifier as a string
   * @param idStr the identifier as a string
   */
  public void setIdStr(String idStr) {
    this.idStr = idStr;
  }
  


  
  
  
}




Java Source Code List

com.bakingcode.io.twitter.Parameters.java
com.bakingcode.io.twitter.TwitterHttpClient.java
com.bakingcode.io.twitter.TwitterOAuth.java
com.bakingcode.io.twitter.Twitter.java
com.bakingcode.io.twitter.Urls.java
com.bakingcode.io.twitter.exceptions.TwitterCommunicationException.java
com.bakingcode.io.twitter.exceptions.TwitterErrorRequestException.java
com.bakingcode.io.twitter.exceptions.TwitterException.java
com.bakingcode.io.twitter.model.ApiConfiguration.java
com.bakingcode.io.twitter.model.ApiMethod.java
com.bakingcode.io.twitter.model.ApiResourceFamily.java
com.bakingcode.io.twitter.model.Coordinates.java
com.bakingcode.io.twitter.model.Cursor.java
com.bakingcode.io.twitter.model.Friendship.java
com.bakingcode.io.twitter.model.IError.java
com.bakingcode.io.twitter.model.Id.java
com.bakingcode.io.twitter.model.IdentifierList.java
com.bakingcode.io.twitter.model.MediaEntity.java
com.bakingcode.io.twitter.model.Place.java
com.bakingcode.io.twitter.model.ResponseString.java
com.bakingcode.io.twitter.model.TrendPlace.java
com.bakingcode.io.twitter.model.Trend.java
com.bakingcode.io.twitter.model.Tweet.java
com.bakingcode.io.twitter.model.TwitterError.java
com.bakingcode.io.twitter.model.User.java
com.bakingcode.io.twitter.tools.HTMLEntity.java
com.bakingcode.io.twitter.tools.Tools.java
com.bakingcode.io.twitter.tools.TwitterLogging.java