When it comes to Android resources, what is a bag?

109 views Asked by At

I'm digging down into some of the low level native Android code. I'm trying to learn how the framework ultimately fills in an attribute set. I'm digging around here and I keep running into "bag". I don't have a good mental picture of what this is..

  1. We have bag_entrys

  2. We can lock/unlock it

  3. Our style attribute finder is of type BagAttributeFinder

Is this an acronym for something? I feel like I'm missing something obvious here that should make my mental abstraction just click.

1

There are 1 answers

1
bunbun On BEST ANSWER

What you are talking about is a type of Data Structure called the bag.

"A bag is a collection where removing items is not supported—its purpose is to provide clients with the ability to collect items and then to iterate through the collected items. Stats.java is a bag client that reads a sequence of real numbers from standard input and prints out their mean and standard deviation."

Source: http://algs4.cs.princeton.edu/13stacks/