Package com.fasterxml.jackson.core.util

# Class Separators

java.lang.Object
com.fasterxml.jackson.core.util.Separators

All Implemented Interfaces:
  `Serializable`

public class Separators extends Object implements Serializable
Value class used with some `PrettyPrinter` implements

Since:
  2.9
See Also:
  - `DefaultPrettyPrinter`
  - `MinimalPrettyPrinter`
  - Serialized Form

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`Separators.Spacing`
Define the spacing around elements like commas and colons.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DEFAULT_ROOT_VALUE_SEPARATOR`
Constant that specifies default "root-level" separator to use between root values: a single space character.

## Constructor Summary

Constructors
Constructor
Description
`Separators()`
`Separators(char objectFieldValueSeparator, char objectEntrySeparator, char arrayValueSeparator)`
Create an instance with the specified separator characters.
`Separators(String rootSeparator, char objectFieldValueSeparator, Separators.Spacing objectFieldValueSpacing, char objectEntrySeparator, Separators.Spacing objectEntrySpacing, char arrayValueSeparator, Separators.Spacing arrayValueSpacing)`
Create an instance with the specified separator characters and spaces around those characters.

## Method Summary

Modifier and Type
Method
Description
`static Separators`
`createDefaultInstance()`
`char`
`getArrayValueSeparator()`
`Separators.Spacing`
`getArrayValueSpacing()`
`char`
`getObjectEntrySeparator()`
`Separators.Spacing`
`getObjectEntrySpacing()`
`char`
`getObjectFieldValueSeparator()`
`Separators.Spacing`
`getObjectFieldValueSpacing()`
`String`
`getRootSeparator()`
`Separators`
`withArrayValueSeparator(char sep)`
`Separators`
`withArrayValueSpacing(Separators.Spacing spacing)`
`Separators`
`withObjectEntrySeparator(char sep)`
`Separators`
`withObjectEntrySpacing(Separators.Spacing spacing)`
`Separators`
`withObjectFieldValueSeparator(char sep)`
`Separators`
`withObjectFieldValueSpacing(Separators.Spacing spacing)`
`Separators`
`withRootSeparator(String sep)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DEFAULT_ROOT_VALUE_SEPARATOR

public static final String DEFAULT_ROOT_VALUE_SEPARATOR
Constant that specifies default "root-level" separator to use between root values: a single space character.

Since:
  2.16
See Also:
  - Constant Field Values

## Constructor Details

### Separators

public Separators()

### Separators

public Separators(char objectFieldValueSeparator, char objectEntrySeparator, char arrayValueSeparator)
Create an instance with the specified separator characters. There will be spaces before and after the `objectFieldValueSeparator` and none around the other two.

### Separators

public Separators(String rootSeparator, char objectFieldValueSeparator, Separators.Spacing objectFieldValueSpacing, char objectEntrySeparator, Separators.Spacing objectEntrySpacing, char arrayValueSeparator, Separators.Spacing arrayValueSpacing)
Create an instance with the specified separator characters and spaces around those characters.

Since:
  2.16

## Method Details

### createDefaultInstance

public static Separators createDefaultInstance()

### withRootSeparator

public Separators withRootSeparator(String sep)

### withObjectFieldValueSeparator

public Separators withObjectFieldValueSeparator(char sep)

### withObjectFieldValueSpacing

public Separators withObjectFieldValueSpacing(Separators.Spacing spacing)

Returns:
  This instance (for call chaining)
Since:
  2.16

### withObjectEntrySeparator

public Separators withObjectEntrySeparator(char sep)

### withObjectEntrySpacing

public Separators withObjectEntrySpacing(Separators.Spacing spacing)

Returns:
  This instance (for call chaining)
Since:
  2.16

### withArrayValueSeparator

public Separators withArrayValueSeparator(char sep)

### withArrayValueSpacing

public Separators withArrayValueSpacing(Separators.Spacing spacing)

Returns:
  This instance (for call chaining)
Since:
  2.16

### getRootSeparator

public String getRootSeparator()

Returns:
  String used as Root value separator
Since:
  2.16

### getObjectFieldValueSeparator

public char getObjectFieldValueSeparator()

### getObjectFieldValueSpacing

public Separators.Spacing getObjectFieldValueSpacing()

Returns:
  `Separators.Spacing` to use for Object fields
Since:
  2.16

### getObjectEntrySeparator

public char getObjectEntrySeparator()

### getObjectEntrySpacing

public Separators.Spacing getObjectEntrySpacing()

Returns:
  `Separators.Spacing` to use for Object entries
Since:
  2.16

### getArrayValueSeparator

public char getArrayValueSeparator()

### getArrayValueSpacing

public Separators.Spacing getArrayValueSpacing()

Returns:
  `Separators.Spacing` to use between Array values
Since:
  2.16