@PublicApi public class

FieldMap

extends HashMap<K, V>
java.lang.Object
   ↳ java.util.AbstractMap<K, V>
     ↳ java.util.HashMap<K, V>
       ↳ com.atlassian.jira.ofbiz.FieldMap

@PublicApi

This class is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Convenience class to use for field maps in OfBizDelegator

See Also

Summary

Public Constructors
FieldMap()
FieldMap(Map<String, ?> initialCapacity)
FieldMap(String fieldName, Object fieldValue)
Public Methods
FieldMap add(String key, Object value)
Adds the given key-value pair to the Map, and returns this in order to allow fluent syntax.
FieldMap addAll(Map<String, ?> map)
Adds all of the key-value pairs from the supplied map to this Map and returns this in order to allow fluent syntax.
static FieldMap build(String name1, Object value1, String name2, Object value2)
static FieldMap build(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5)
static FieldMap build(String fieldName, Object fieldValue)
static FieldMap build(String name1, Object value1, String name2, Object value2, String name3, Object value3)
static FieldMap build(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4)
[Expand]
Inherited Methods
From class java.util.HashMap
From class java.util.AbstractMap
From class java.lang.Object
From interface java.util.Map

Public Constructors

public FieldMap ()

public FieldMap (Map<String, ?> initialCapacity)

public FieldMap (String fieldName, Object fieldValue)

Public Methods

public FieldMap add (String key, Object value)

Adds the given key-value pair to the Map, and returns this in order to allow fluent syntax.

This method allows you to write code like the following:
FieldMap fieldMap = new FieldMap("id", 12L).add("name", "Fred");

Parameters
key key with which the specified value is to be associated.
value value to be associated with the specified key.
Returns
  • This FieldMap.

public FieldMap addAll (Map<String, ?> map)

Adds all of the key-value pairs from the supplied map to this Map and returns this in order to allow fluent syntax.

This method allows you to write code like the following:
FieldMap defaults = new FieldMap("name", "Fred").add("description", "Fred's stuff"); FieldMap fieldMap = new FieldMap("id", 12L).addAll(defaults);

Parameters
map the map of values to add
Returns
  • This FieldMap.

public static FieldMap build (String name1, Object value1, String name2, Object value2)

public static FieldMap build (String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5)

public static FieldMap build (String fieldName, Object fieldValue)

public static FieldMap build (String name1, Object value1, String name2, Object value2, String name3, Object value3)

public static FieldMap build (String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4)