Android Open Source - final_year_frontend Match






From Project

Back to project page final_year_frontend.

License

The source code is released under:

MIT License

If you think the Android project final_year_frontend 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.james.erebus.core;
//from   w w w  .ja v a 2  s  .  c o m

/**
 * A class to represent a Match
 * @author james
 *
 */

public class Match {

  private String player1 = "";
  private String player2 = "";
  private String parentTourny = "";
  private String date = "";
  private String links = "";
  private String time = "";
  private String status;
  private int id;

  /**
   * @return the player1
   */
  public String getPlayer1() {
    return player1;
  }

  /**
   * @param player1 the player1 to set
   */
  public void setPlayer1(String player1) {
    this.player1 = player1;
  }

  /**
   * @return the player2
   */
  public String getPlayer2() {
    return player2;
  }

  /**
   * @param player2 the player2 to set
   */
  public void setPlayer2(String player2) {
    this.player2 = player2;
  }

  /**
   * @return the parentTourny
   */
  public String getParentTourny() {
    return parentTourny;
  }

  /**
   * @param parentTourny the parentTourny to set
   */
  public void setParentTourny(String parentTourny) {
    this.parentTourny = parentTourny;
  }

  /**
   * @return the date
   */
  public String getDate() {
    return date;
  }

  /**
   * @param date the date to set
   */
  public void setDate(String date) {
    this.date = date;
  }

  /**
   * @return the links
   */
  public String getLinks() {
    return links;
  }

  /**
   * @param links the links to set
   */
  public void setLinks(String links) {
    this.links = links;
  }

  /**
   * @return the time
   */
  public String getTime() {
    return time;
  }

  /**
   * @param time the time to set
   */
  public void setTime(String time) {
    this.time = time;
  }

  /**
   * @return the status
   */
  public String getStatus() {
    return status;
  }

  /**
   * @param status the status to set
   */
  public void setStatus(String status) {
    this.status = status;
  }

  /**
   * @return the id
   */
  public int getId() {
    return id;
  }

  /**
   * @param id the id to set
   */
  public void setId(int id) {
    this.id = id;
  }
  
  /**
   * 
   * @param m The {@link com.james.erebus.core.Match} to compare to
   * @return If the matches are equal in terms of their ID
   */
  public boolean equalsMatch(Match m)
  {
    return (id == m.getId());
  }
  
  /**
   * 
   * @param m The {@link com.james.erebus.core.Match} to compare to
   * @return If the match is different
   */
  public boolean isDifferentTo(Match m)
  {
    if(!player1.equals(m.getPlayer1()) || !player2.equals(m.getPlayer2()) || !parentTourny.equals(m.getParentTourny())
        || !date.equals(m.getDate()) || !links.equals(m.getLinks()) || !time.equals(m.getTime()))
      return true;
    return false;
  }

  /**
   * @return A string representation of the {@link com.james.erebus.core.Match} object
   */
  @Override
  public String toString()
  {
    return "|Id: " + id + "|Time: " + time + "|status: " + status + "|player1: " + player1 + "|player2: " + player2 + "|parenttourny: "
        + parentTourny + "|links: " + links + "|date: " + date;
  }

}




Java Source Code List

com.james.erebus.GCMIntentService.java
com.james.erebus.JSONJava.CDL.java
com.james.erebus.JSONJava.CookieList.java
com.james.erebus.JSONJava.Cookie.java
com.james.erebus.JSONJava.HTTPTokener.java
com.james.erebus.JSONJava.HTTP.java
com.james.erebus.JSONJava.JSONArray.java
com.james.erebus.JSONJava.JSONException.java
com.james.erebus.JSONJava.JSONML.java
com.james.erebus.JSONJava.JSONObject.java
com.james.erebus.JSONJava.JSONString.java
com.james.erebus.JSONJava.JSONStringer.java
com.james.erebus.JSONJava.JSONTokener.java
com.james.erebus.JSONJava.JSONWriter.java
com.james.erebus.JSONJava.XMLTokener.java
com.james.erebus.JSONJava.XML.java
com.james.erebus.core.C2DMRegistrationReceiver.java
com.james.erebus.core.CustomOnItemSelectedListener.java
com.james.erebus.core.MainActivity.java
com.james.erebus.core.MatchActivity.java
com.james.erebus.core.MatchButtonActivity.java
com.james.erebus.core.MatchOptions.java
com.james.erebus.core.MatchPreferencesFragment.java
com.james.erebus.core.Match.java
com.james.erebus.core.NotificationActivity.java
com.james.erebus.core.Notification.java
com.james.erebus.core.ParentPreferencesFragment.java
com.james.erebus.core.TournamentActivity.java
com.james.erebus.core.TournamentButtonActivity.java
com.james.erebus.core.TournamentFactory.java
com.james.erebus.core.TournamentPreferencesFragment.java
com.james.erebus.core.Tournament.java
com.james.erebus.core.TournyMatchOptions.java
com.james.erebus.misc.AppConsts.java
com.james.erebus.misc.MiscJsonHelpers.java
com.james.erebus.misc.misc.java
com.james.erebus.networking.AddDeviceTask.java
com.james.erebus.networking.AddMatchSubscriptionTask.java
com.james.erebus.networking.AddTournamentSubscriptionToServerTask.java
com.james.erebus.networking.GcmRegisterDeviceTask.java
com.james.erebus.networking.GetMatchesTask.java
com.james.erebus.networking.GetTournamentsTask.java
com.james.erebus.networking.MatchRetriever.java
com.james.erebus.networking.MatchSubscriptionManager.java
com.james.erebus.networking.MiscNetworkingHelpers.java
com.james.erebus.networking.NotificationManager.java
com.james.erebus.networking.RemoveMatchSubscriptionFromServerTask.java
com.james.erebus.networking.RemoveTournamentSubscriptionFromServerTask.java
com.james.erebus.networking.Retriever.java
com.james.erebus.networking.SubscriptionManager.java
com.james.erebus.networking.SubscriptionRetriever.java
com.james.erebus.networking.TournamentRetriever.java
com.james.erebus.networking.TournamentSubscriptionManager.java