我有一个对象predictorObj,它包含如下数据: {“name”:“mpg”,“type”:“double”}
static BasicDBObject predictorObj;
我有一个ArrayList对象配置文件:配置文件包含
之类的信息{
"MessageStatus": 2,
"Origin": 2.0,
"_id": {
"$oid": "596340fc8b0fa35d2880d9a7"
},
"accerlation": 17.5,
"cylinders": 4.0,
"displacement": 110.0,
"file_id": {
"$oid": "59633e48b760e7c8071a6c1c"
},
"horsepower": 87.0,
"message_status": 2,
"modelyear": 70.0,
"modified_date": {
"$date": "2017-07-10T08:47:01.641Z"
},
"mpg": 25.0,
"snet_id": "new_project",
"unique_id": "413",
"username": "peugeot 504",
"weight": 2672.0
}
{
"MessageStatus": 2,
"Origin": 3.0,
"_id": {
"$oid": "596340fc8b0fa35d2880d9a5"
},
"accerlation": 14.5,
"cylinders": 4.0,
"displacement": 97.0,
"file_id": {
"$oid": "59633e48b760e7c8071a6c1c"
},
"horsepower": 88.0,
"message_status": 2,
"modelyear": 70.0,
"modified_date": {
"$date": "2017-07-10T08:47:01.641Z"
},
"mpg": 27.0,
"snet_id": "new_project",
"unique_id": "411",
"username": "datsun pl510",
"weight": 2130.0
}
{
"MessageStatus": 2,
"Origin": 1.0,
"_id": {
"$oid": "596340fc8b0fa35d2880d9a4"
},
"accerlation": 16.0,
"cylinders": 6.0,
"displacement": 200.0,
"file_id": {
"$oid": "59633e48b760e7c8071a6c1c"
},
"horsepower": 85.0,
"message_status": 2,
"modelyear": 70.0,
"modified_date": {
"$date": "2017-07-10T08:47:01.641Z"
},
"mpg": 21.0,
"snet_id": "new_project",
"unique_id": "410",
"username": "ford maverick",
"weight": 2587.0
}
{
"MessageStatus": 2,
"Origin": 1.0,
"_id": {
"$oid": "596340fc8b0fa35d2880d9a3"
},
"accerlation": 15.5,
"cylinders": 6.0,
"displacement": 199.0,
"file_id": {
"$oid": "59633e48b760e7c8071a6c1c"
},
"horsepower": 97.0,
"message_status": 2,
"modelyear": 70.0,
"modified_date": {
"$date": "2017-07-10T08:47:01.641Z"
},
"mpg": 18.0,
"snet_id": "new_project",
"unique_id": "409",
"username": "amc hornet",
"weight": 2774.0
}
{
"MessageStatus": 2,
"Origin": 1.0,
"_id": {
"$oid": "596340fc8b0fa35d2880d997"
},
"accerlation": 10.5,
"cylinders": 8.0,
"displacement": 302.0,
"file_id": {
"$oid": "59633e48b760e7c8071a6c1c"
},
"horsepower": 140.0,
"message_status": 2,
"modelyear": 70.0,
"modified_date": {
"$date": "2017-07-10T08:47:01.641Z"
},
"mpg": 17.0,
"snet_id": "new_project",
"unique_id": "397",
"username": "ford torino",
"weight": 3449.0
}
{
"MessageStatus": 2,
"Origin": 1.0,
"_id": {
"$oid": "596340fc8b0fa35d2880d996"
},
"accerlation": 12.0,
"cylinders": 8.0,
"displacement": 304.0,
"file_id": {
"$oid": "59633e48b760e7c8071a6c1c"
},
"horsepower": 150.0,
"message_status": 2,
"modelyear": 70.0,
"modified_date": {
"$date": "2017-07-10T08:47:01.641Z"
},
"mpg": 16.0,
"snet_id": "new_project",
"unique_id": "396",
"username": "amc rebel sst",
"weight": 3433.0
}
{
"MessageStatus": 2,
"Origin": 1.0,
"_id": {
"$oid": "596340fc8b0fa35d2880d992"
},
"accerlation": 19.4,
"cylinders": 4.0,
"displacement": 119.0,
"file_id": {
"$oid": "59633e48b760e7c8071a6c1c"
},
"horsepower": 82.0,
"message_status": 2,
"modelyear": 82.0,
"modified_date": {
"$date": "2017-07-10T08:47:01.641Z"
},
"mpg": 31.0,
"snet_id": "new_project",
"unique_id": "392",
"username": "chevy s-10",
"weight": 2720.0
}
{
"MessageStatus": 2,
"Origin": 1.0,
"_id": {
"$oid": "596340fc8b0fa35d2880d991"
},
"accerlation": 18.6,
"cylinders": 4.0,
"displacement": 120.0,
"file_id": {
"$oid": "59633e48b760e7c8071a6c1c"
},
"horsepower": 79.0,
"message_status": 2,
"modelyear": 82.0,
"modified_date": {
"$date": "2017-07-10T08:47:01.641Z"
},
"mpg": 28.0,
"snet_id": "new_project",
"unique_id": "391",
"username": "ford ranger",
"weight": 2625.0
}
{
"MessageStatus": 2,
"Origin": 1.0,
"_id": {
"$oid": "596340fc8b0fa35d2880d990"
},
"accerlation": 11.6,
"cylinders": 4.0,
"displacement": 135.0,
"file_id": {
"$oid": "59633e48b760e7c8071a6c1c"
},
"horsepower": 84.0,
"message_status": 2,
"modelyear": 82.0,
"modified_date": {
"$date": "2017-07-10T08:47:01.641Z"
},
"mpg": 32.0,
"snet_id": "new_project",
"unique_id": "390",
"username": "dodge rampage",
"weight": 2295.0
}
{
"MessageStatus": 2,
"Origin": 2.0,
"_id": {
"$oid": "596340fc8b0fa35d2880d98f"
},
"accerlation": 24.6,
"cylinders": 4.0,
"displacement": 97.0,
"file_id": {
"$oid": "59633e48b760e7c8071a6c1c"
},
"horsepower": 52.0,
"message_status": 2,
"modelyear": 82.0,
"modified_date": {
"$date": "2017-07-10T08:47:01.641Z"
},
"mpg": 44.0,
"snet_id": "new_project",
"unique_id": "389",
"username": "vw pickup",
"weight": 2130.0
}
{
"MessageStatus": 2,
"Origin": 1.0,
"_id": {
"$oid": "596340fc8b0fa35d2880d98a"
},
"accerlation": 14.7,
"cylinders": 6.0,
"displacement": 232.0,
"file_id": {
"$oid": "59633e48b760e7c8071a6c1c"
},
"horsepower": 112.0,
"message_status": 2,
"modelyear": 82.0,
"modified_date": {
"$date": "2017-07-10T08:47:01.641Z"
},
"mpg": 22.0,
"snet_id": "new_project",
"unique_id": "384",
"username": "ford granada l",
"weight": 2835.0
}
{
"MessageStatus": 2,
"Origin": 3.0,
"_id": {
"$oid": "596340fc8b0fa35d2880d986"
},
"accerlation": 16.2,
"cylinders": 4.0,
"displacement": 91.0,
"file_id": {
"$oid": "59633e48b760e7c8071a6c1c"
},
"horsepower": 67.0,
"message_status": 2,
"modelyear": 82.0,
"modified_date": {
"$date": "2017-07-10T08:47:01.641Z"
},
"mpg": 38.0,
"snet_id": "new_project",
"unique_id": "380",
"username": "datsun 310 gx",
"weight": 1995.0
}
现在我想从配置文件中检索与预测器objject匹配的数据。
有人可以帮忙吗?