org.jfree.util

Class PaintList

Implemented Interfaces:
Cloneable, Serializable

public class PaintList
extends AbstractObjectList

A table of Paint objects.
Author:
David Gilbert

Field Summary

Fields inherited from class org.jfree.util.AbstractObjectList

DEFAULT_INITIAL_CAPACITY

Constructor Summary

PaintList()
Creates a new list.

Method Summary

boolean
equals(Object obj)
Tests the list for equality with another object (typically also a list).
Paint
getPaint(int index)
Returns a Paint object from the list.
int
hashCode()
Returns a hash code value for the object.
void
setPaint(int index, Paint paint)
Sets the Paint for an item in the list.

Methods inherited from class org.jfree.util.AbstractObjectList

clear, clone, equals, get, hashCode, indexOf, set, size

Constructor Details

PaintList

public PaintList()
Creates a new list.

Method Details

equals

public boolean equals(Object obj)
Tests the list for equality with another object (typically also a list).
Overrides:
equals in interface AbstractObjectList
Parameters:
obj - the other object (null permitted).
Returns:
A boolean.

getPaint

public Paint getPaint(int index)
Returns a Paint object from the list.
Parameters:
index - the index (zero-based).
Returns:
The object.

hashCode

public int hashCode()
Returns a hash code value for the object.
Overrides:
hashCode in interface AbstractObjectList
Returns:
the hashcode

setPaint

public void setPaint(int index,
                     Paint paint)
Sets the Paint for an item in the list. The list is expanded if necessary.
Parameters:
index - the index (zero-based).
paint - the Paint.