Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and system for extracting unique object in set

A collection and object technology, applied in the field of Java coding, can solve the problems of inconvenient extraction of objects and inconvenient use, and achieve the effect of reducing the number of data queries and reducing workload

Inactive Publication Date: 2019-07-12
重庆天蓬网络有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] Existing php projects, or Java projects translated from php, store data structures mostly in json array format that supports fast read and write of php, which is extremely inconvenient to use in java projects
At the same time, there will be some situations where it is necessary to extract the object from an object collection according to the unique attribute of the object. The existing methods for extracting objects are inconvenient to extract objects from the collection.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for extracting unique object in set
  • Method and system for extracting unique object in set

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] The embodiments of the technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings. The following embodiments are only used to explain the technical solutions of the present invention more clearly, and therefore are only used as examples, and cannot be used to limit the protection scope of the present invention.

[0026] It should be noted that, unless otherwise specified, the technical or scientific terms used in this application shall have the usual meaning understood by those skilled in the art to which the present invention belongs.

[0027] Such as figure 1 As shown, a method for extracting unique objects in a collection of the present invention includes:

[0028] S1: Define a collection filter, and declare the collection filter selection object interface;

[0029] S2: Implement the set filter selection object interface, use a reflection mechanism, and obtain a set of objects to be extracted from the object s...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and a system for extracting a unique object in a set, which relate to the technical field of Java coding and comprise the following steps: defining a set filter, and declaring the set filter to select an object interface; realizing that the set filter selects an object interface in an anonymous internal class, and obtaining a to-be-extracted object set according tothe attribute name and the parameter value by using a reflection mechanism; and transmitting the to-be-extracted object set into an input parameter set, traversing the input parameter set by using aniteration device, and extracting the object from the input parameter set. According to the method, the json array in the existing data can be quickly converted into the List set, and then the uniqueobject is extracted according to the unique attribute id. According to the method, firstly, the workload of data query times, data migration and the like is reduced, secondly, a solution is provided for extracting the unique object from the set according to the unique attribute in the follow-up development work, and the workload of similar problems in the follow-up work is reduced.

Description

Technical field [0001] The present invention relates to the technical field of Java coding, in particular to a method and system for extracting unique objects in a collection. Background technique [0002] Existing php projects, or Java projects translated from php, mostly store data structures in a json array format that supports php fast reading and writing, which is extremely inconvenient to use in java projects. At the same time, there are some situations where it is necessary to extract the object from a collection of objects based on its unique attributes. The existing methods for extracting objects are inconvenient to extract objects from the collection. Summary of the invention [0003] In view of the defects in the prior art, the present invention provides a method and system for extracting unique objects in a collection, in order to facilitate the rapid compatibility of existing Java projects with the json array format, and to directly extract objects from the collection...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/2453G06F16/2455
CPCG06F16/24534G06F16/2455
Inventor 程普挥
Owner 重庆天蓬网络有限公司