HeapPriorityQueue.drv + capacity, toArray, toString
For consistency between FIFO and Heap queues:
I have added the same methods (capacity, toArray, toString) also for Heap Priority Queues.
Results of toArray, toString are not sorted (for implementation simplicity and performance)
Argh I just released 😂
Can you check that in the source you're using (4-space-width) TABs? I had to fix all spacing by hand in the previous PRs.
Strange! I am a big fan of TAB as indent char (it is my default settting in IDEA) Additionally IDEA shows me "Tab" as current indent in your project 🤷♀️
You can extra force rules with .editorconfig file in the root folder
# EditorConfig is awesome: https://EditorConfig.org
root = true
[*]
charset = utf-8
indent_style = tab
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = false
spaces_around_operators = true
tab_width = 2
indent_size = 2
ij_continuation_indent_size = 2
ij_any_align_multiline_parameters = false
[*.yaml]
indent_style = space
tab_width = 2
[*.yml]
indent_style = space
tab_width = 2
https://github.com/vigna/fastutil/pull/359
I have extra checked: it is TAB on my side 🤷♀️
ve TAB, not spaces
HeapPriorityQueue.drv uses TAB (I have double-checked)
FastByteArrayOutputStream also 👍
But ArrayFIFOQueue.drv somehow uses mix of tabs and spaces 🤦♂️
I think .editorconfig + my extra IDEA configuration (treat .drv as .java) must help 👍
If I can do anything with this PR, please feel free to command 🙏
I'm on vacation now—I will be able to look into this mid-September.
Two observations:
- Capacity/toArray is ok but you have to implement it for all queues based on arrays (heap queues and array queues) for uniformity.
- toString could be done with some streaming (
.collect(Collectors.joining(", "));
Now I am on Vacation 😅 So If you have time, feel free to use my PR as the initial step to your masterpiece 🤝 I will try to help when I have access to the desk and Internet