Class Attributes
java.lang.Object
org.springframework.restdocs.snippet.Attributes
A fluent API for building a map of attributes.
- Author:
- Andy Wilkinson
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn attribute (key-value pair).static final classA simple builder for an attribute (key-value pair). -
Method Summary
Modifier and TypeMethodDescriptionattributes(Attributes.Attribute... attributes) Creates aMapof the givenattributes.static Attributes.AttributeBuilderCreates an attribute with the givenkey.
-
Method Details
-
key
Creates an attribute with the givenkey. A value for the attribute must still be specified.- Parameters:
key- the key of the attribute- Returns:
- an
AttributeBuilderto use to specify the value of the attribute - See Also:
-
attributes
Creates aMapof the givenattributes.- Parameters:
attributes- the attributes- Returns:
- a Map of the attributes
-