Package org.pushingpixels.flamingo.api.bcb

# Class BreadcrumbItem<T>

java.lang.Object
org.pushingpixels.flamingo.api.bcb.BreadcrumbItem<T>

Type Parameters:
  `T` - Type of associated data.

public final class BreadcrumbItem<T> extends Object
A single item in the `JBreadcrumbBar` model.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected T`
`data`
Data value for this item.
`protected String`
`key`
Display key for this item.

## Constructor Summary

Constructors
Constructor
Description
`BreadcrumbItem(String s)`
Creates a new item.
`BreadcrumbItem(String key, T data)`
Creates a new item.

## Method Summary

Modifier and Type
Method
Description
`T`
`getData()`
`Icon`
`getIcon()`
Returns the icon of `this` item.
`int`
`getIndex()`
Returns the index of `this` item.
`String`
`getKey()`
`void`
`setIcon(Icon icon)`
Sets the new icon on `this` item.
`void`
`setIndex(int index)`
Sets the index of `this` item.
`void`
`setKey(String key)`
`String`
`toString()`

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

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

## Field Details

### key

protected String key
Display key for this item.

### data

protected T data
Data value for this item.

## Constructor Details

### BreadcrumbItem

public BreadcrumbItem(String key, T data)
Creates a new item.

Parameters:
  `key` - Item key.
  `data` - Item data.

### BreadcrumbItem

public BreadcrumbItem(String s)
Creates a new item.

Parameters:
  `s` - String that will be used for display purposes.

## Method Details

### getKey

public String getKey()

### getData

public T getData()

### setKey

public void setKey(String key)

### getIndex

public int getIndex()
Returns the index of `this` item.

Returns:
  The index of `this` item.

### setIndex

public void setIndex(int index)
Sets the index of `this` item.

Parameters:
  `index` - The new index of `this` item.

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### getIcon

public Icon getIcon()
Returns the icon of `this` item.

Returns:
  The icon of `this` item.

### setIcon

public void setIcon(Icon icon)
Sets the new icon on `this` item.

Parameters:
  `icon` - The new icon for `this` item.