/src/lib/storage/internal/hashed_dictionary_node.e

http://github.com/tybor/Liberty · Specman e · 68 lines · 32 code · 9 blank · 27 comment · 0 complexity · 393b9bc7859a07d39a9819c018610332 MD5 · raw file

  1. -- This file is part of a Liberty Eiffel library.
  2. -- See the full copyright at the end.
  3. --
  4. class HASHED_DICTIONARY_NODE[V_, K_]
  5. --
  6. -- Auxiliary class to implement HASHED_DICTIONARY.
  7. --
  8. inherit
  9. ANY_HASHED_DICTIONARY_NODE
  10. create {ABSTRACT_HASHED_DICTIONARY}
  11. make
  12. feature {ABSTRACT_HASHED_DICTIONARY}
  13. item: V_
  14. key: K_
  15. next: like Current
  16. -- The `next' one when some clash occurs.
  17. set_item (i: like item)
  18. do
  19. item := i
  20. ensure
  21. item = i
  22. end
  23. set_next (n: like next)
  24. do
  25. next := n
  26. ensure
  27. next = n
  28. end
  29. make (i: like item; k: like key; n: like next)
  30. do
  31. item := i
  32. key := k
  33. next := n
  34. ensure
  35. item = i
  36. key = k
  37. next = n
  38. end
  39. end -- class HASHED_DICTIONARY_NODE
  40. --
  41. -- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
  42. --
  43. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  44. -- of this software and associated documentation files (the "Software"), to deal
  45. -- in the Software without restriction, including without limitation the rights
  46. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  47. -- copies of the Software, and to permit persons to whom the Software is
  48. -- furnished to do so, subject to the following conditions:
  49. --
  50. -- The above copyright notice and this permission notice shall be included in
  51. -- all copies or substantial portions of the Software.
  52. --
  53. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  54. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  55. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  56. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  57. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  58. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  59. -- THE SOFTWARE.