Готовая лабораторная работа 7
This commit is contained in:
parent
e1e6a15b1a
commit
5ec534d436
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module type="JAVA_MODULE" version="4">
|
<module type="JAVA_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager">
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
<output url="file://$MODULE_DIR$/out/production/Tank" />
|
<output url="file://$MODULE_DIR$/out/production/Tank" />
|
||||||
<output-test url="file://$MODULE_DIR$/out/test/Tank" />
|
<output-test url="file://$MODULE_DIR$/out/test/Tank" />
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
|
@ -24,7 +24,7 @@ public class SetGeneric <T extends Object> {
|
|||||||
|
|
||||||
public boolean Insert(T tank, int position) {
|
public boolean Insert(T tank, int position) {
|
||||||
// Проверка позиции
|
// Проверка позиции
|
||||||
if (position < 0 || position >= _maxCount)
|
if (position < 0 || position >= Count())
|
||||||
throw new TankNotFoundException(position);
|
throw new TankNotFoundException(position);
|
||||||
|
|
||||||
if (_places.size() >= _maxCount)
|
if (_places.size() >= _maxCount)
|
||||||
|
Loading…
Reference in New Issue
Block a user