Skip to main content
Tweeted twitter.com/#!/StackProgrammer/status/593394929856045056
added 30 characters in body
Source Link
Jay Wick
  • 385
  • 2
  • 10

I have a list of items I am adding to, however this special list will delete anything past a given capacity. Note the order is maintained.

For the life of me, I can't think of the name of such a construct.

Consider

data = new SpecialListType(3); // set capacity to 3

data.Add("A");
data.Add("B");
data.Add("C");
data.Add("D");

data.Dump(); // returns {"B", "C", "D"}

What is this? Some form of a Set or Buffer? And is there a framework implementation of this in Java and .NET?

I have a list of items I am adding to, however this special list will delete anything past a given capacity.

For the life of me, I can't think of the name of such a construct.

Consider

data = new SpecialListType(3); // set capacity to 3

data.Add("A");
data.Add("B");
data.Add("C");
data.Add("D");

data.Dump(); // returns {"B", "C", "D"}

What is this? Some form of a Set or Buffer? And is there a framework implementation of this in Java and .NET?

I have a list of items I am adding to, however this special list will delete anything past a given capacity. Note the order is maintained.

For the life of me, I can't think of the name of such a construct.

Consider

data = new SpecialListType(3); // set capacity to 3

data.Add("A");
data.Add("B");
data.Add("C");
data.Add("D");

data.Dump(); // returns {"B", "C", "D"}

What is this? Some form of a Set or Buffer? And is there a framework implementation of this in Java and .NET?

Source Link
Jay Wick
  • 385
  • 2
  • 10

What data type is this?

I have a list of items I am adding to, however this special list will delete anything past a given capacity.

For the life of me, I can't think of the name of such a construct.

Consider

data = new SpecialListType(3); // set capacity to 3

data.Add("A");
data.Add("B");
data.Add("C");
data.Add("D");

data.Dump(); // returns {"B", "C", "D"}

What is this? Some form of a Set or Buffer? And is there a framework implementation of this in Java and .NET?