Package groovy.lang
Class NamedValue<T>
java.lang.Object
groovy.lang.NamedValue<T>
- Type Parameters:
T- the value type
- All Implemented Interfaces:
Serializable
Represents a value with name
- Since:
- 4.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NamedValue
Creates a named value pair.- Parameters:
name- the nameval- the value
-
-
Method Details
-
getName
Returns the name.- Returns:
- the name
-
getVal
Returns the value.- Returns:
- the value
-
equals
-
hashCode
public int hashCode() -
toString
-
toString
Returns the formattedname=valuerepresentation using the supplied formatting options.- Parameters:
options- the formatting options to apply to the value- Returns:
- the formatted named value
-