---
title: "Map与数据哪个更好些"
author: "east_java"
date: "2009-08-11T20:13:10Z"
tags: []
slug: "map"
draft: false
lastmod: "2009-08-11T20:13:10Z"
id: 445018
url: "https://japi.iteye.com/blog/445018"
---

在数据库查询的时候，有条件与排序查询的。

```java

List findAll(Map filter,Map order);

```

也可以使用

```java

List findAll(Object ...filter,Object...order);

```

那个会更好些呢。

哎。。从效率来讲当然是数组的啦。。
map不管是使用哪种，都会带来别的消耗。
比如 treemap 要有排序功能  hashmap要hash算法啦。。。