list<Map>对map的contain方法

  List<Map> list = new ArrayList<Map>();
  
  Map map1 = new HashMap<String,String>();
  map1.put("1", "1");
  Map map2 = new HashMap<Long,Long>();
  map2.put(1L, 1L);
  Map map3 = new HashMap<String,String>();
  map3.put("2", "2");
  list.add(map1);
  System.out.println(map1);
  System.out.println(map2);
  System.out.println(list.contains(map2));
  System.out.println(list.contains(map3));

// 输出结果

    {1=1}
    {1= 1}
    false
    false

小结:是否存在考虑两方面的事情:1.值相等,2.对象类型相同。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Build 1632<br>requires software maintenance through 2008.04.03. (Beta release.) <br>New! Added context-sensitive help to VA X dialogs. Click ? or press F1 to get help. (case=8980) <br>New! Visual Studio 2008-style transparent listboxes are available in all IDEs. Hold down Ctrl when listbox is displayed to activate. (case=10072) 7209, 6972 <br>New! Added option to include or exclude refactoring suggestions in listboxes; see Advanced | Refactoring | Include refactoring suggestions in listboxes. (case=10428) 5797, 7254 <br>"return" takes precedence over "RETCODE" in suggestion lists. (case=11277) 7036 <br>Fixed incompatibility with XNA Game Studio 2.0. (case=10703) 7064 <br>Restored "put n spaces between method name and ()" option under Advanced | Corrections. (case=10995) 7304 <br>Fixed a problem typing "else" on a line by itself. (case=8415) <br>Debugger tooltips display without flickering. (case=8817) 6647 <br>Fixed hang when opening web site project in Visual Studio 2008. (case=10401) <br>Fixed intermittent crash when typing a VB Imports statement in Visual Studio 2008 on Windows Vista. (case=15154) <br>Ctrl+Tab document switching is handled properly in Visual Studio 2008. (case=10303) 7010 <br>Visual Studio 2008 C++ include directories that contain double backslashes due to environment variable expansion are located and parsed correctly. (case=11261) <br>Highlight current line works properly in .js and .asp/.aspx files in Visual Studio 2008. (case=15384) <br>Visual Basic enumerations are parsed correctly. (case=12161) <br>Removed C-style comment and semicolon from Encapsulate Field in Visual Basic files. (case=11160, case=4475) 7107 <br>Object methods called on boxed string literals in C# are parsed correctly. (case=8012) 6513 <br>Subsequent rename operations issued from VA Outline target the correct symbol. (case=10502) 7039 <br>MFC dispatch map is shown in VA Outline. (case=10514) <br>Tooltips are positioned correctly when VA Outline is undocked in VC6. (case=9976) 6946 <br>VA Outline shows correct hierarchy for C++ classes containing friend methods without friend class declaration. (case=10740) 7072 <br>.Net symbols are excluded from suggestion lists in unmanaged C++ solutions. (case=11391) 7148 <br>Fixed Extract Method with for each loop in managed C++. (case=14864) 7348 <br>Typing a dot after a C++ constructor invocation [ e.g. std::string("some text"). ] displays member list properly. (case=9876) <br>C++ using declarations (using namespace::identifier) are parsed correctly. (case=9436) <br>STL list<> and vector<> member lists appear correctly following a "using namespace std::list" or "using namespace std::vector" directive. (case=12345) 7226 <br>Empty C++ preprocessor directives are ignored (fixes problem parsing Boost library). (case=10353) <br>Typedefs declared inside template classes are parsed correctly. (case=12098) <br>Improved parsing of STL iterator patterns (case=11842) 7136, 7202, 7212 <br>Improved stability when parsing deep templates. (case=15454) <br>Fixed dereferenced iterators missing from Find References / Rename. (case=1702) 6451, 4978 <br>Cloned Find References windows are not hidden behind the VC6 IDE. (case=10201) 7000, 7026 <br>IDE warning message about writing to a read-only file is brought to the foreground during a rename operation if applicable. (case=8958) <br>#include paths are preserved when typing a slash with Repair Case disabled. (case=12025) 7200 <br>C# generic methods are colored properly. (case=9300) 6801 <br>Comments in tooltips and views use IDE comment color. (case=9363) 6904, 6808 <br>Dialog edit controls are colored properly in Windows Vista. (case=9281) <br>Filenames displayed in lists and views are not syntax colored. (case=12556, case=12788) <br>Foreground text color is automatically changed if it matches the background color. (case=14268) <br>VA View Symbols in Solution list items are colored properly. (case=14899) <br>Quick Info and Parameter Tooltips invoked via the keyboard are colored properly. (case=3082) 5462 <br>Goto (Alt+G) handles template class typedefs. (case=4249) 6168, 5774 <br>Goto handles duplicate files better (as with VSS shared directories). (case=5567, case=7457) 6027, 6021 <br>Listboxes are positioned such that they are not truncated at the right edge of the screen. (case=5178) <br>Listbox remains on the same side of a symbol (either above or below) when typing inside parentheses. (case=8998) 6672 <br>Windows Vista visual styles are applied to listboxes. (case=9275) <br>Accepting a suggestion from a listbox properly replaces acronym text. (case=14290) 7316 <br>Fixed disappearing listboxes in .js and .asax files. (case=1699, case=15295) 4843 <br>Fixed bad icons appearing in suggestion lists. (case=14469) <br>#include directives listed in Find References results are displayed with question mark icons. (case=9592) 6869 <br>Esc key turns off Highlight All when Find References results window is undocked. (case=9364) 6803 <br>Find References error messages may optionally be displayed in the status bar instead of a modal message box. (case=10226) 7038, 6997 <br>Spelling errors in comments with XML tags are underlined. (case=9649) 6893 <br>XML comment suggestion list opened with < functions properly. (case=12324) 7229 <br>Suggestions are suppressed in comments and string literals. (case=10480) 5797, 7030, 7055 <br>Change Signature does not cause some known symbols to become unknown. (case=10432) 6762 <br>"Enable automatic Quick Info Tooltips" option is forced on when enabling "Display comments from source files when available" option in Advanced | Display. (case=10967) <br>Macros in [VA X install directory]\Misc\stdafx.h are parsed each time a project is opened. (case=284) <br>Surround with { indents properly when selection is made from bottom to top. (case=1521) 6792, 5961, 5796, 5249 <br>Long words (>64 chars) in comments are not underlined as mistyped. (case=3485) 5634, 5588 <br>Improved Autosave performance. (case=9821) 6916, 5613 <br>Open File in Solution grid lines are drawn correctly in Windows XP. (case=9948) <br>Forward-declared stable symbols are shown in italic. (case=399) 2263, 1934, 1912 <br>Repair Case changes only those symbols that differ by case alone (similarly named symbols are not changed). (case=8723) <br>Corrected spacing around spell check replacements. (case=7768) 6471 <br>Eliminated spurious suggestions. (case=12061) 6900 <br>Source files residing in directories named p4win or p4v (or their descendants) are included when parsing. (case=11506) 7150 <br>Missing VC6 toolbar icons have been restored (case=10126) 6980 <br>Filtering toolbar shows the rightmost button correctly. (case=10623) 7044 <br><br>中文注释有乱码<br>

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值