public function testScenario1() { $entry = new MapEntry('a', 0); $this->assertEquals('a', $entry->getKey()); $this->assertEquals(0, $entry->getValue()); $entry = new MapEntry('b', 1); $this->assertEquals('b', $entry->getKey()); $this->assertEquals(1, $entry->getValue()); }
public static function compare(MapEntry $a, MapEntry $b) { return ord($a->getKey()) - ord($b->getKey()); }