Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
preparacionPOO
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
javrami
preparacionPOO
Commits
e998e161
Commit
e998e161
authored
Jan 12, 2020
by
carmuno
Browse files
Options
Downloads
Patches
Plain Diff
mas cambios
parent
c779d9f8
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
enunciados/Ordinario 2016-17.pdf
+0
-0
0 additions, 0 deletions
enunciados/Ordinario 2016-17.pdf
src/ord_16_17/Coleccion.java
+56
-0
56 additions, 0 deletions
src/ord_16_17/Coleccion.java
src/ord_16_17/Play.java
+9
-0
9 additions, 0 deletions
src/ord_16_17/Play.java
with
65 additions
and
0 deletions
enunciados/Ordinario 2016-17.pdf
0 → 100644
+
0
−
0
View file @
e998e161
File added
This diff is collapsed.
Click to expand it.
src/ord_16_17/Coleccion.java
0 → 100644
+
56
−
0
View file @
e998e161
package
ord_16_17
;
import
java.util.ArrayList
;
import
java.util.Collection
;
public
class
Coleccion
<
E
extends
Play
>
{
private
ArrayList
<
E
>
lista
;
private
String
nombre
;
public
Coleccion
()
{
lista
=
new
ArrayList
<
E
>();
}
public
void
add
(
E
element
)
{
assert
(!
lista
.
contains
(
element
));
lista
.
add
(
element
);
}
public
E
get
(
int
pos
)
{
return
lista
.
get
(
pos
);
}
public
void
remove
(
int
pos
)
{
lista
.
remove
(
pos
);
}
public
void
playAll
()
{
lista
.
stream
().
forEach
(
play
->
play
.
Play
());
}
public
ArrayList
<
E
>
getLista
(){
return
(
ArrayList
<
E
>)
lista
.
clone
();
}
public
Coleccion
<
E
>
concatenar
(
Coleccion
<
E
>
collecion
){
Coleccion
<
E
>
newColeccion
=
new
Coleccion
<
E
>();
for
(
E
play
:
lista
)
{
newColeccion
.
add
(
play
);
}
for
(
E
play
:
collecion
.
getLista
())
{
newColeccion
.
add
(
play
);
}
return
newColeccion
;
}
}
This diff is collapsed.
Click to expand it.
src/ord_16_17/Play.java
0 → 100644
+
9
−
0
View file @
e998e161
package
ord_16_17
;
public
interface
Play
{
public
void
Play
();
}
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
register
or
sign in
to comment