Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HCI Android Templ
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
Container 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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fabio-Andre Heyming
HCI Android Templ
Merge requests
!1
Mal aufn Master megren
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Mal aufn Master megren
classes_Fabio
into
master
Overview
0
Commits
65
Pipelines
0
Changes
106
Merged
Fabio-Andre Heyming
requested to merge
classes_Fabio
into
master
2 years ago
Overview
0
Commits
65
Pipelines
0
Changes
106
Expand
git push
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
ec775e8f
65 commits,
2 years ago
106 files
+
6185
−
20
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
106
Search (e.g. *.vue) (Ctrl+P)
app/src/main/java/com/example/mampfmobil/ui/Classes/Bestellung.java
0 → 100644
+
86
−
0
Options
package
com.example.mampfmobil.ui.Classes
;
import
android.content.Context
;
import
android.util.Log
;
import
com.example.mampfmobil.R
;
import
com.example.mampfmobil.ui.MampfMobil
;
import
java.util.Vector
;
public
class
Bestellung
{
static
int
idCounter
=
1
;
public
boolean
delivery
=
true
;
public
Deliverer
deliverer
=
null
;
public
String
state
;
public
Supplier
supplier
;
public
Customer
costumer
;
public
Vector
<
BestellungsTeil
>
bestellungsTeile
;
public
int
id
;
public
Bestellung
(
Supplier
supplier
,
Boolean
delivery
,
Context
context
){
bestellungsTeile
=
new
Vector
<>();
this
.
supplier
=
supplier
;
state
=
context
.
getString
(
R
.
string
.
ordered
)
;
this
.
delivery
=
delivery
;
this
.
costumer
=
MampfMobil
.
currentCustomer
;
id
=
idCounter
;
idCounter
++;
}
public
Bestellung
(
Supplier
supplier
,
Boolean
delivery
,
String
state
){
bestellungsTeile
=
new
Vector
<>();
this
.
supplier
=
supplier
;
this
.
state
=
state
;
this
.
delivery
=
delivery
;
this
.
costumer
=
MampfMobil
.
currentCustomer
;
id
=
idCounter
;
idCounter
++;
}
//for dummy data
public
Bestellung
(
Supplier
supplier
,
Boolean
delivery
,
String
state
,
Customer
costumer
){
bestellungsTeile
=
new
Vector
<>();
this
.
supplier
=
supplier
;
this
.
state
=
state
;
this
.
delivery
=
delivery
;
this
.
costumer
=
costumer
;
id
=
idCounter
;
idCounter
++;
}
public
Bestellung
(
int
id
,
Supplier
supplier
,
Boolean
delivery
,
String
state
,
Customer
costumer
,
int
delivererID
){
bestellungsTeile
=
new
Vector
<>();
this
.
supplier
=
supplier
;
this
.
state
=
state
;
this
.
delivery
=
delivery
;
this
.
costumer
=
costumer
;
this
.
id
=
id
;
if
(
delivererID
!=
0
){
for
(
Deliverer
d:
MampfMobil
.
deliverers
){
if
(
d
.
id
==
delivererID
)
{
this
.
deliverer
=
d
;
}
}
}
}
public
void
addBestellungsteil
(
BestellungsTeil
bt
){
Boolean
notFound
=
true
;
for
(
BestellungsTeil
btOld:
bestellungsTeile
){
if
(
btOld
.
item
==
bt
.
item
){
notFound
=
false
;
btOld
.
quantity
=
btOld
.
quantity
+
bt
.
quantity
;
}
}
if
(
notFound
){
bestellungsTeile
.
add
(
bt
);
}
}
}
Loading