Module org.jfree.chart3d
Package org.jfree.chart3d.label

# Class StandardXYZLabelGenerator

java.lang.Object
org.jfree.chart3d.label.StandardXYZLabelGenerator

All Implemented Interfaces:
  `Serializable`, `XYZLabelGenerator`

public class StandardXYZLabelGenerator extends Object implements XYZLabelGenerator, Serializable
A default implementation of the `XYZLabelGenerator` interface. The implementation uses a `Formatter` instance to generate the labels, which are typically used as the series labels in the chart legend. Three values are passed to the formatter for possible inclusion in the resulting label: (1) the key for the series, (2) the count for the number of items in the series (as an `Integer`) and (3) the total of the non-`NaN` values in the series (as a `Double`).
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.

Since:
  1.2
See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`COUNT_TEMPLATE`
A label template that will display the series key followed by the number of data items for the series (in brackets).
`static final String`
`DEFAULT_TEMPLATE`
The default label template.
`static final String`
`KEY_ONLY_TEMPLATE`
A label template that will display the series key only.
`static final String`
`TOTAL_TEMPLATE`
A label template that will display the series key followed by the total of the data items for the series (in brackets) with zero decimal places.
`static final String`
`TOTAL_TEMPLATE_2DP`
A label template that will display the series key followed by the total of the data items for the series (in brackets) with zero decimal places.

## Constructor Summary

Constructors
Constructor
Description
`StandardXYZLabelGenerator()`
The default constructor.
`StandardXYZLabelGenerator(String template)`
Creates a new instance with the specified label template.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
Tests this label generator for equality with an arbitrary object.
`<S extends Comparable<S>>
String`
`generateSeriesLabel(XYZDataset<S> dataset, S seriesKey)`
Generates a series label.
`int`
`hashCode()`

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

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

## Field Details

### KEY_ONLY_TEMPLATE

public static final String KEY_ONLY_TEMPLATE
A label template that will display the series key only.

See Also:
  - Constant Field Values

### TOTAL_TEMPLATE

public static final String TOTAL_TEMPLATE
A label template that will display the series key followed by the total of the data items for the series (in brackets) with zero decimal places.

See Also:
  - Constant Field Values

### TOTAL_TEMPLATE_2DP

public static final String TOTAL_TEMPLATE_2DP
A label template that will display the series key followed by the total of the data items for the series (in brackets) with zero decimal places.

See Also:
  - Constant Field Values

### COUNT_TEMPLATE

public static final String COUNT_TEMPLATE
A label template that will display the series key followed by the number of data items for the series (in brackets).

See Also:
  - Constant Field Values

### DEFAULT_TEMPLATE

public static final String DEFAULT_TEMPLATE
The default label template.

See Also:
  - Constant Field Values

## Constructor Details

### StandardXYZLabelGenerator

public StandardXYZLabelGenerator()
The default constructor.

### StandardXYZLabelGenerator

public StandardXYZLabelGenerator(String template)
Creates a new instance with the specified label template.

Parameters:
  `template` - the label template (`null` not permitted).

## Method Details

### generateSeriesLabel

public <S extends Comparable<S>> String generateSeriesLabel(XYZDataset<S> dataset, S seriesKey)
Generates a series label.

Specified by:
  `generateSeriesLabel` in interface `XYZLabelGenerator`
Type Parameters:
  `S` - The type of the series keys in the dataset.
Parameters:
  `dataset` - the dataset (`null` not permitted).
  `seriesKey` - the series key (`null` not permitted).
Returns:
  The series label (possibly `null`).

### equals

public boolean equals(Object obj)
Tests this label generator for equality with an arbitrary object.

Overrides:
  `equals` in class `Object`
Parameters:
  `obj` - the object (`null` permitted).
Returns:
  A boolean.

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`