Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Entrega_javcalv_victorm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
javcalv
Entrega_javcalv_victorm
Commits
6efc57aa
Commit
6efc57aa
authored
Oct 25, 2024
by
Javier Calvo
Browse files
Options
Downloads
Patches
Plain Diff
Modificacions en Puerto.java
parent
f592b34e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/es/markse/Puerto.java
+23
-9
23 additions, 9 deletions
src/es/markse/Puerto.java
with
23 additions
and
9 deletions
src/es/markse/Puerto.java
+
23
−
9
View file @
6efc57aa
...
...
@@ -23,6 +23,7 @@ public class Puerto {
/**
* 1.1.1. Metodo que agrega un nuevo muelle al puerto. Se comprueba que ese muelle no se encuentre ya agregado.
* Si no lo esta, lo agrega, si ya se encuentra agregado, no.
* @param m objeto tipo Muelle
*/
public
void
anyadirMuelle
(
Muelle
m
)
{
...
...
@@ -34,15 +35,14 @@ public class Puerto {
/**
* 1.1.2 Método que elimina un muelle del puerto.
* @param id Identificador del muelle que se elimina
* @return
* @return
true si ha elimidao el muelle o false si no lo ha encontrado para eliminar
*/
public
boolean
eliminarMuelle
(
String
id
)
{
return
this
.
muelles
.
removeIf
(
muelle
->
muelle
.
getIdentificador
().
equals
(
id
));
}
/**
* Funcion para comprobar si un muelle esta en ese puerto o no, para agregarle o eliminarle
* Metodo empleado por anyadirMuelle() y eliminarMuelle()
* Metodo para comprobar si un muelle esta en ese puerto o no, para agregarle
* @param m obtejo Muelle
* @return true/false
*/
...
...
@@ -55,3 +55,17 @@ public class Puerto {
}
return
false
;
}
/**
* 1.1.3 Metodo que comprueba si un puerto esta completo o no
* @return true si esta completo o false si no lo esta
*/
public
boolean
comprobarSiEstaLleno
()
{
for
(
Muelle
muelle
:
this
.
muelles
)
{
if
(
muelle
.)
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment