2
0

ItemRequest.java 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Copyright (C) 2004-2014 L2J Server
  3. *
  4. * This file is part of L2J Server.
  5. *
  6. * L2J Server is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J Server is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package com.l2jserver.gameserver.model;
  20. /**
  21. *
  22. */
  23. public class ItemRequest
  24. {
  25. int _objectId;
  26. int _itemId;
  27. long _count;
  28. long _price;
  29. public ItemRequest(int objectId, long count, long price)
  30. {
  31. _objectId = objectId;
  32. _count = count;
  33. _price = price;
  34. }
  35. public ItemRequest(int objectId, int itemId, long count, long price)
  36. {
  37. _objectId = objectId;
  38. _itemId = itemId;
  39. _count = count;
  40. _price = price;
  41. }
  42. public int getObjectId()
  43. {
  44. return _objectId;
  45. }
  46. public int getItemId()
  47. {
  48. return _itemId;
  49. }
  50. public void setCount(long count)
  51. {
  52. _count = count;
  53. }
  54. public long getCount()
  55. {
  56. return _count;
  57. }
  58. public long getPrice()
  59. {
  60. return _price;
  61. }
  62. @Override
  63. public int hashCode()
  64. {
  65. return _objectId;
  66. }
  67. @Override
  68. public boolean equals(Object obj)
  69. {
  70. if (this == obj)
  71. {
  72. return true;
  73. }
  74. if (!(obj instanceof ItemRequest))
  75. {
  76. return false;
  77. }
  78. return (_objectId != ((ItemRequest) obj)._objectId);
  79. }
  80. }