com.github.cage.image
Class ConstantColorGenerator
java.lang.Object
com.github.cage.image.ConstantColorGenerator
- All Implemented Interfaces:
- IGenerator<Color>
public class ConstantColorGenerator
- extends Object
- implements IGenerator<Color>
IGenerator
implementation that returns always the same Color
.
This class is thread safe.
- Author:
- akiraly
Method Summary |
Color |
next()
Returns an object with type T on every call. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantColorGenerator
public ConstantColorGenerator(Color color)
- Constructor.
- Parameters:
color
- not null
next
public Color next()
- Description copied from interface:
IGenerator
- Returns an object with type
T
on every call. The returned
object does not have to be a new instance.
- Specified by:
next
in interface IGenerator<Color>
- Returns:
- generated object
Copyright © 2011. All Rights Reserved.