Android Open Source - pink-ponies Entity






From Project

Back to project page pink-ponies.

License

The source code is released under:

Software License Agreement (BSD License) Copyright (c) 2013, Pink Ponies Team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted prov...

If you think the Android project pink-ponies 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

/**
 * Copyright (c) 2013 Alexander Konovalov, Andrey Konovalov, Sergey Voronov, Vitaly Malyshev. All
 * rights reserved. Use of this source code is governed by a BSD-style license that can be found in
 * the LICENSE file.//from w ww .  j ava2s  .c o m
 */

package ru.pinkponies.server;

import ru.pinkponies.protocol.Location;

/**
 * The entity class.
 */
public class Entity {
  /**
   * The id of the entity.
   */
  private final long id;

  /**
   * The location of the entity.
   */
  private Location location;

  /**
   * Creates a new entity with the given id and location.
   * 
   * @param id
   *            the entity id
   * @param location
   *            the entity location
   */
  public Entity(final long id, final Location location) {
    this.id = id;
    this.location = location;
  }

  /**
   * Returns the id of this entity.
   * 
   * @return the id of this entity
   */
  public final long getId() {
    return this.id;
  }

  /**
   * Returns this entity's location.
   * 
   * @return this entity's location.
   */
  public final Location getLocation() {
    return this.location;
  }

  /**
   * Sets this entity's location.
   * 
   * @param location
   *            the location
   */
  public final void setLocation(final Location location) {
    this.location = location;
  }

  @Override
  public String toString() {
    return "Entity [id=" + this.id + ", " + this.location + "]";
  }
}




Java Source Code List

android.UnusedStub.java
ru.pinkponies.app.LoginActivity.java
ru.pinkponies.app.MainActivity.java
ru.pinkponies.app.MapOverlay.java
ru.pinkponies.app.net.NetworkListener.java
ru.pinkponies.app.net.NetworkingService.java
ru.pinkponies.app.net.NetworkingThread.java
ru.pinkponies.app.net.package-info.java
ru.pinkponies.app.package-info.java
ru.pinkponies.protocol.AppleUpdatePacket.java
ru.pinkponies.protocol.ClientOptionsPacket.java
ru.pinkponies.protocol.Location.java
ru.pinkponies.protocol.LoginPacket.java
ru.pinkponies.protocol.Packet.java
ru.pinkponies.protocol.PlayerUpdatePacket.java
ru.pinkponies.protocol.Protocol.java
ru.pinkponies.protocol.QuestActionPacket.java
ru.pinkponies.protocol.QuestUpdatePacket.java
ru.pinkponies.protocol.SayPacket.java
ru.pinkponies.protocol.package-info.java
ru.pinkponies.server.Apple.java
ru.pinkponies.server.Entity.java
ru.pinkponies.server.IdManager.java
ru.pinkponies.server.Player.java
ru.pinkponies.server.Quest.java
ru.pinkponies.server.Server.java
ru.pinkponies.server.package-info.java