public bool match(Version v)
{
for (int i=0; i<m_constraints.Length; i++)
{
Constraint c = m_constraints[i];
if (c.isPlus)
{
// versionPlus
if (c.version.compare(v) <= 0)
return true;
}
else if (c.endVersion != null)
{
// versionRange
if (c.version.compare(v) <= 0 &&
(c.endVersion.compare(v) >= 0 || match(c.endVersion, v)))
return true;
}
else
{
// versionSimple
if (match(c.version, v))
return true;
}
}
return false;
}