What is a "bag" in Java? I tried to find out from Google but I could not find a precise answer. I got idea from what I found on google that bags are similar to multisets. I want to know whether I am right or wrong because I didnt get proper answer through searching on google.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Bag: Collection without order, may contain duplicates. The same as multiset:
from Wikipedia.
Note that duplicate is based on the
equals(
method in most JRE libraries.Core java contains no Bag class though the Collections interface does have this to say:
Other libraries such as Apache Commons Collections may contain implementations named Bag and Guava has Multisets.