Added method to get color class by id.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@902 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Andrzej Kapolka
2010-03-11 02:03:04 +00:00
parent 5920f44e64
commit 4145611b9c
@@ -397,7 +397,7 @@ public class ColorPository implements Serializable
*/
public ColorRecord getColorRecord (int classId, int colorId)
{
ClassRecord record = _classes.get(classId);
ClassRecord record = getClassRecord(classId);
if (record == null) {
// if they request color class zero, we assume they're just
// decoding a blank colorprint, otherwise we complain
@@ -433,6 +433,14 @@ public class ColorPository implements Serializable
return record.colors.get(colorId);
}
/**
* Looks up the requested color class record.
*/
public ClassRecord getClassRecord (int classId)
{
return _classes.get(classId);
}
/**
* Adds a fully configured color class record to the pository. This is only called by the XML
* parsing code, so pay it no mind.