Class TernaryInvariant