public static function compare(\blaze\lang\Object $o1, \blaze\lang\Object $o2) { if ($o1 !== null && $o1 instanceof \blaze\lang\Comparable) { return $o1->compareTo($o2); } throw new \blaze\lang\ClassCastException($o1 . ' is not Comparable'); }
public function finalize() { parent::finalize(); try { if ($this->out != null) { $this->out->close(); } } catch (\blaze\lang\Exception $e) { } try { if ($this->err != null) { $this->err->close(); } } catch (\blaze\lang\Exception $e) { } }
public function compareTo(Object $obj) { if ($obj === null) { throw new NullPointerException(); } if ($obj instanceof Float) { return $this->value - $obj->value < 0 ? -1 : ($this->value - $obj->value > 0 ? 1 : 0); } throw new ClassCastException('Could not cast ' . $obj->getClass()->getName() . ' to Float.'); }
public function compareTo(Object $obj) { if ($obj === null) { throw new NullPointerException(); } if ($obj instanceof BigDecimal) { return bccomp($this->value, $obj->value); } throw new ClassCastException('Could not cast ' . $obj->getClass()->getName() . ' to BigDecimal.'); }
public function compareTo(Object $that) { if (!$that instanceof URI) { throw new \blaze\lang\IllegalArgumentException('Parameters must be of the type blaze\\net\\URI'); } $c = 0; if (($c = self::compareIgnoringCase($this->scheme, $that->scheme)) != 0) { return $c; } if ($this->isOpaque()) { if ($that->isOpaque()) { // Both opaque if (($c = self::compare($this->schemeSpecificPart, $that->schemeSpecificPart)) != 0) { return $c; } return self::compare($this->fragment, $that->fragment); } return +1; // Opaque > hierarchical } else { if ($that->isOpaque()) { return -1; // Hierarchical < opaque } } return $this->url->compareTo($that); }
public function compareTo(Object $obj) { if ($obj instanceof Byte) { return $this->value - $obj->value; } throw new ClassCastException('Could not cast ' . $obj->getClass()->getName() . ' to Byte.'); }