public class AttributeMapCover extends Object
Constructor and Description |
---|
AttributeMapCover() |
Modifier and Type | Method and Description |
---|---|
void |
add(Attribute attribute,
String value)
Stores attribute and its value.
|
void |
clear()
Removes all attributes and their values from the collection.
|
boolean |
containsAttribute(Attribute attribute)
Checks whether collection contains the attribute.
|
boolean |
containsAttribute(String attributeName)
Checks whether collection contains the attribute.
|
boolean |
equals(Object obj) |
Map<Attribute,String> |
getAttributes()
Returns all the attributes and their values in form of map.
|
String |
getValue(Attribute attribute)
Returns the value for the given attribute.
|
String |
getValue(String attributeName)
Returns the value for the given attribute.
|
int |
hashCode() |
void |
remove(Attribute attribute)
Removes attribute from the collection.
|
void |
remove(String attributeName)
Removes attribute from the collection.
|
int |
size()
Returns the number of attributes in the collection.
|
com.sun.net.httpserver.Headers |
toHeaders()
Returns an occi text representation of OCCI attributes in form of
headers.
|
String |
toOneLineText()
Returns text representation of OCCI attributes in one line.
|
String |
toPrefixText()
Returns a text representation of OCCI attributes with prefix.
|
String |
toString()
Resturns string representation of the collection
|
public void add(Attribute attribute, String value)
attribute
- attribute to be stored. Cannot be null.value
- value to be stored for the attribute. Cannot be null.public void remove(Attribute attribute)
attribute
- attribute to be removed. Cannot be null.public void remove(String attributeName)
attributeName
- name of the attribute to be removed. Cannot be null.public boolean containsAttribute(Attribute attribute)
attribute
- attribute to be looked up in the collectionpublic boolean containsAttribute(String attributeName)
attributeName
- name of the attribute to be looked up in the
collection. Cannot be null.public String getValue(Attribute attribute)
attribute
- attribute of which value is returned.public String getValue(String attributeName)
attributeName
- name of the attribute of which value is returned.
Cannot be null.public Map<Attribute,String> getAttributes()
public void clear()
public int size()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
obj
- object to compare collection withObject.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public String toPrefixText()
public com.sun.net.httpserver.Headers toHeaders()
public String toOneLineText()
Copyright © 2016. All Rights Reserved.