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?