Method and system for implementing collection program interface for accessing a collection of data associated with a legacy enumeration application interface
First Claim
1. A method of implementing a collection program interface for accessing a collection of data associated with a legacy enumeration application program interface, the method comprising:
- retrieving a first set of at least one data element from the collection of data and storing the retrieved first set of at least one data element in a vector in response to receiving an initial first call on the collection application program interface;
comparing a first positional cursor to a size of the vector in response to receiving a second call on the collection application program interface subsequent to receiving the initial first call on the collection application program interface;
retrieving a second set of at least one data element from the collection of data and storing the retrieved second set of at least one data element in the vector in response to the first positional cursor being equal to or greater than the size of the vector; and
retrieving the first set of at least one data element from the vector in response to the first positional cursor being less than the size of the vector.
1 Assignment
0 Petitions
Accused Products
Abstract
A software wrapper for interfacing to pre-existing software code is provided. The software wrapper is capable of inheriting from a first application program interface (API) and a second API. For calls to the first API, the software wrapper delegates to a pre-existing enumeration of objects. The wrapper creates a vector identifying elements of the enumeration. Iterators provided by the wrapper maintain positional cursors for calls to the second API. A comparison is made between each of the positional cursors and the vector. If a positional cursor exceeds the size of the vector, additional elements are extracted from the enumeration, placed in the vector, and returned on the second API. Otherwise, if the positional cursor is smaller than the vector size, the wrapper delegates directly to the vector. The first API can be a java-based enumeration API and the second API can be a java-based collection API.
12 Citations
20 Claims
-
1. A method of implementing a collection program interface for accessing a collection of data associated with a legacy enumeration application program interface, the method comprising:
-
retrieving a first set of at least one data element from the collection of data and storing the retrieved first set of at least one data element in a vector in response to receiving an initial first call on the collection application program interface;
comparing a first positional cursor to a size of the vector in response to receiving a second call on the collection application program interface subsequent to receiving the initial first call on the collection application program interface;
retrieving a second set of at least one data element from the collection of data and storing the retrieved second set of at least one data element in the vector in response to the first positional cursor being equal to or greater than the size of the vector; and
retrieving the first set of at least one data element from the vector in response to the first positional cursor being less than the size of the vector. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A system, comprising:
-
a processor; and
a memory storing instructions operable with the processor to implement a collection program interface for accessing a collection of data associated with a legacy enumeration application program interface, the instructions being executed for;
retrieving a first set of at least one data element from the collection of data and storing the retrieved first set of at least one data element in a vector in response to receiving an initial first call on the collection application program interface;
comparing a first positional cursor to a size of the vector in response to receiving a second call on the collection application program interface subsequent to receiving the initial first call on the collection application program interface;
retrieving a second set of a least one data element from the collection of data and storing the retrieved second set of at least one data element in the vector in response to the first positional cursor being equal to or greater than the size of the vector; and
retrieving the first set of a least one data element from the vector in response to the first positional cursor being less than the size of the vector. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A signal bearing medium tangibly embodying a program of machine-readable instructions executable by a processor to perform operation to implement a collection program interface for accessing a collection of data associated with a legacy enumeration application program interface, the operations comprising:
-
retrieving a firs set of at least one data element from the collection of data and storing the retrieved first set of at least one data element in a vector in response to receiving an initial first call on the collection application program interface;
comparing a first positional cursor to a size of the vector in response to receiving a second call on the collection application program interface subsequent to receiving the initial first call on the collection application program interface;
retrieving a second set of at least one data element from the collection of data and storing the retrieved second set of at least one data element in the vector in response to the first positional cursor being equal to or greater than the size of the vector; and
retrieving the first set of at least one data element from the vector in response to the first positional cursor being less than the size of the vector. - View Dependent Claims (14, 15, 16, 17, 18)
-
-
19. A system for implementing a collection program interface for accessing a collection of data associated with a legacy enumeration application program interface, the system comprising:
-
means for retrieving a first set of at least one data element from the collection of data and storing the retrieved first set of at least one data element in a vector in response to receiving an initial first call on the collection application program interface;
means for comparing a first positional cursor to a size of the vector in response to receiving a second call on the collection application program interface subsequent to receiving the initial first call on the collection application program interface;
means for retrieving a second set of at least one data element from the collection of data and storing the retrieved second set of at least one data element in the vector in response to the first positional cursor being equal to or greater than the size of the vector; and
means far retrieving the first set of at least one data element from the vector in response to the first positional cursor being less than the size of the vector. - View Dependent Claims (20)
-
Specification