Record Class ConcatenatingSubscriber.Separators
java.lang.Object
java.lang.Record
io.micronaut.http.body.ConcatenatingSubscriber.Separators
- Record Components:
beforeFirst- If there are any items, the buffer to insert before the first oneafterLast- If there are any items, the buffer to insert after the last onebetween- Buffer to insert between any itemsempty- Buffer to insert if there are no items
- Enclosing class:
ConcatenatingSubscriber
public static record ConcatenatingSubscriber.Separators(@Nullable io.micronaut.core.io.buffer.ReadBuffer beforeFirst, @Nullable io.micronaut.core.io.buffer.ReadBuffer afterLast, @Nullable io.micronaut.core.io.buffer.ReadBuffer between, @Nullable io.micronaut.core.io.buffer.ReadBuffer empty)
extends Record
Fixed buffers to insert before, after and between items.
- Since:
- 4.8.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ConcatenatingSubscriber.SeparatorsjsonSeparators(ReadBufferFactory)usingReadBufferFactory.getJdkFactory().static final ConcatenatingSubscriber.SeparatorsNo separators. -
Constructor Summary
ConstructorsConstructorDescriptionSeparators(@Nullable io.micronaut.core.io.buffer.ReadBuffer beforeFirst, @Nullable io.micronaut.core.io.buffer.ReadBuffer afterLast, @Nullable io.micronaut.core.io.buffer.ReadBuffer between, @Nullable io.micronaut.core.io.buffer.ReadBuffer empty) Creates an instance of aSeparatorsrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable io.micronaut.core.io.buffer.ReadBufferReturns the value of theafterLastrecord component.@Nullable io.micronaut.core.io.buffer.ReadBufferReturns the value of thebeforeFirstrecord component.@Nullable io.micronaut.core.io.buffer.ReadBufferbetween()Returns the value of thebetweenrecord component.@Nullable io.micronaut.core.io.buffer.ReadBufferempty()Returns the value of theemptyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.jsonSeparators(io.micronaut.core.io.buffer.ReadBufferFactory factory) Create the appropriate separators for JSON using the given buffer factory.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NONE
No separators. -
JDK_JSON
jsonSeparators(ReadBufferFactory)usingReadBufferFactory.getJdkFactory().
-
-
Constructor Details
-
Separators
public Separators(@Nullable io.micronaut.core.io.buffer.ReadBuffer beforeFirst, @Nullable io.micronaut.core.io.buffer.ReadBuffer afterLast, @Nullable io.micronaut.core.io.buffer.ReadBuffer between, @Nullable io.micronaut.core.io.buffer.ReadBuffer empty) Creates an instance of aSeparatorsrecord class.- Parameters:
beforeFirst- the value for thebeforeFirstrecord componentafterLast- the value for theafterLastrecord componentbetween- the value for thebetweenrecord componentempty- the value for theemptyrecord component
-
-
Method Details
-
jsonSeparators
public static ConcatenatingSubscriber.Separators jsonSeparators(io.micronaut.core.io.buffer.ReadBufferFactory factory) Create the appropriate separators for JSON using the given buffer factory.- Parameters:
factory- The factory to use- Returns:
- The separators
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
beforeFirst
public @Nullable io.micronaut.core.io.buffer.ReadBuffer beforeFirst()Returns the value of thebeforeFirstrecord component.- Returns:
- the value of the
beforeFirstrecord component
-
afterLast
-
between
-
empty
-