Java Doc for OneToManyMap.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » RSS RDF » Jena 2.5.5 » com.hp.hpl.jena.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.hp.hpl.jena.util.OneToManyMap

OneToManyMap
public class OneToManyMap implements Map(Code)
An extension to a standard map that supports one-to-many mappings: that is, there may be zero, one or many values corresponding to a given key.
author:
   Ian Dickinson, HP Labs (email)
version:
   CVS info: $Id: OneToManyMap.java,v 1.15 2008/01/02 12:07:44 andy_seaborne Exp $

Inner Class :public static class Entry implements Map.Entry


Constructor Summary
public  OneToManyMap()
    
public  OneToManyMap(OneToManyMap map)
    

Method Summary
public  voidclear()
     Clear all entries from the map.
public  booleancontains(Object key, Object value)
    
public  booleancontainsKey(Object key)
     Answer true if the map contains the given value as a key.
public  booleancontainsValue(Object value)
     Answer true if the map contains the given object as a value stored against any key.
public  SetentrySet()
     Answer a set of the mappings in this map.
public  booleanequals(Object o)
     Compares the specified object with this map for equality. Returns true if the given object is also a map and the two Maps represent the same mappings.
public  Objectget(Object key)
     Get a value for this key.
public  IteratorgetAll(Object key)
     Answer an iterator over all of the values for the given key.
public  inthashCode()
     Returns the hash code value for this map.
public  booleanisEmpty()
     Answer true if the map is empty of key-value mappings.
public  SetkeySet()
    
public  Objectput(Object key, Object value)
     Associates the given value with the given key.
public  voidputAll(Map m)
    

Put all entries from one map into this map.

public  Objectremove(Object key)
     Remove all of the associations for the given key.
public  voidremove(Object key, Object value)
    

Remove the specific association between the given key and value.

public  intsize()
    
public  StringtoString()
    

Answer a string representation of this map.

public  Collectionvalues()
    

Returns a collection view of the values contained in this map.



Constructor Detail
OneToManyMap
public OneToManyMap()(Code)

Construct a new empty one-to-many map




OneToManyMap
public OneToManyMap(OneToManyMap map)(Code)

Construct a new one-to-many map whose contents are initialised from the existing map.


Parameters:
  map - An existing one-to-many map




Method Detail
clear
public void clear()(Code)
Clear all entries from the map.



contains
public boolean contains(Object key, Object value)(Code)

Answer true if this mapping contains the pair (key, value).


Parameters:
  key - A key object
Parameters:
  value - A value object True if key has valueas one of its values in this mapping



containsKey
public boolean containsKey(Object key)(Code)
Answer true if the map contains the given value as a key.
Parameters:
  key - The key object to test for True or false



containsValue
public boolean containsValue(Object value)(Code)
Answer true if the map contains the given object as a value stored against any key. Note that this is quite an expensive operation in the current implementation.
Parameters:
  value - The value to test for True if the value is in the map



entrySet
public Set entrySet()(Code)
Answer a set of the mappings in this map. Each member of the set will be a Map.Entry value. A Set of the mappings as Map.Entry values.



equals
public boolean equals(Object o)(Code)
Compares the specified object with this map for equality. Returns true if the given object is also a map and the two Maps represent the same mappings. More formally, two maps t1 and t2 represent the same mappings if t1.entrySet().equals(t2.entrySet()). This ensures that the equals method works properly across different implementations of the Map interface.
Parameters:
  o - The object to be compared for equality with this map. True if the specified object is equal to this map.



get
public Object get(Object key)(Code)
Get a value for this key. Since this map is explicitly designed to allow there to be more than one mapping per key, this method will return an undetermined instance of the mapping. If no mapping exists, or the selected value is null, null is returned.
Parameters:
  key - The key to access the map. One of the values this key corresponds to, or null.
See Also:   OneToManyMap.getAll



getAll
public Iterator getAll(Object key)(Code)
Answer an iterator over all of the values for the given key. An iterator is always supplied, even if the key is not present.
Parameters:
  key - The key object An iterator over all of the values for this key in the map



hashCode
public int hashCode()(Code)
Returns the hash code value for this map. The hash code of a map is defined to be the sum of the hashCodes of each entry in the map's entrySet view. This ensures that t1.equals(t2) implies that t1.hashCode()==t2.hashCode() for any two maps t1 and t2, as required by the general contract of Object.hashCode



isEmpty
public boolean isEmpty()(Code)
Answer true if the map is empty of key-value mappings. True if there are no entries.



keySet
public Set keySet()(Code)
Answer a set of the keys in this map The keys of the map as a Set



put
public Object put(Object key, Object value)(Code)
Associates the given value with the given key. Since this map formulation allows many values for one key, previous associations with the key are not lost. Consequently, the method always returns null (since the replaced value is not defined).
Parameters:
  key - The key object
Parameters:
  value - The value object Null.



putAll
public void putAll(Map m)(Code)

Put all entries from one map into this map. Tests for m being a OneToManyMap, and, if so, copies all of the entries for each key.


Parameters:
  m - The map whose contents are to be copied into this map



remove
public Object remove(Object key)(Code)
Remove all of the associations for the given key. If only a specific association is to be removed, use OneToManyMap.remove(java.lang.Object,java.lang.Object) instead. Has no effect if the key is not present in the map. Since no single specific association with the key is defined, this method always returns null.
Parameters:
  key - All associations with this key will be removed null



remove
public void remove(Object key, Object value)(Code)

Remove the specific association between the given key and value. Has no effect if the association is not present in the map. If all values for a particular key have been removed post removing this particular association, the key will no longer appear as a key in the map.


Parameters:
  key - The key object
Parameters:
  value - The value object



size
public int size()(Code)

Answer the number of key-value mappings in the map

The number of key-value pairs.



toString
public String toString()(Code)

Answer a string representation of this map. This can be quite a long string for large maps.




values
public Collection values()(Code)

Returns a collection view of the values contained in this map. Specifically, this will be a set, so duplicate values that appear for multiple keys are suppressed.

A set of the values contained in this map.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.