Beispiel #1
0
 /**
  * @depends  testInit
  * @param    ArrayList
  * @return   void
  */
 public function testClear(ArrayList $listObject)
 {
     $this->assertFalse($listObject->isEmpty());
     $listObject->clear();
     $this->assertTrue($listObject->isEmpty());
 }
Beispiel #2
0
echo count($listObject);
echo '<br/>';
echo '<br/>';
echo '<br/>';
echo 'remove value: ';
echo '<br/>';
$listObject = new ArrayList(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
$listObject->remove(4);
$listObject->remove(10);
$listObject->remove(15);
echo 'Count: ';
echo count($listObject);
echo '<br/>';
echo 'remove index: ';
echo '<br/>';
$listObject = new ArrayList(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12));
$listObject->removeIndex(4);
$listObject->removeIndex(10);
$listObject->removeIndex(15);
echo 'Count: ';
echo count($listObject);
echo '<br/>';
echo '<br/>';
echo '<br/>';
echo 'is empty (has any entries): ';
if ($listObject->isEmpty()) {
    echo 'FALSE';
} else {
    echo 'TRUE';
}
echo '<br/>';