Patent ID: 8276111

Claim:
A method of providing access to a dataset in a type-safe manner, comprising: storing a dataset including a plurality of data elements and a corresponding plurality of order keys for indicating an ordering of the data elements, each order key associated with one of the data elements; generating an interface to the dataset that is parameterized by an element type parameter for identifying a type of data element and a key type parameter for identifying a type of order key, wherein the interface is configured to provide access to the data elements and the order keys in the dataset in a type-safe manner; and performing an operation configured to operate on the dataset via the interface, wherein the operation is configured to be statically checked by a compiler to verify that accesses to the dataset by the operation are type-safe, wherein the operation is configured to perform at least one of changing an ordering of the data elements in the dataset, changing a value of at least one of the data elements in the dataset, adding data elements to the dataset, and removing data elements from the dataset.