summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/uic/barcode/ticket/api/impl/SimpleLuggageRestriction.java
blob: 8ded7ba8c9a931a94bd9061022818028d8e4e66f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 * 
 */
package org.uic.barcode.ticket.api.impl;

import java.util.Collection;
import java.util.HashSet;

import org.uic.barcode.ticket.api.spec.ILuggageRestriction;
import org.uic.barcode.ticket.api.spec.IRegisteredLuggage;

// TODO: Auto-generated Javadoc
/**
 * The Class SimpleLuggageRestriction.
 */
public class SimpleLuggageRestriction implements ILuggageRestriction {

	/** The max hand luggage pieces. */
	protected int maxHandLuggagePieces = 3;
	
	/** The max non hand luggage pieces. */
	protected int maxNonHandLuggagePieces= 1;
	
	/** The registered luggage. */
	protected Collection<IRegisteredLuggage> registeredLuggage	= new HashSet<IRegisteredLuggage>();
	
	/* (nicht-Javadoc)
	 * @see org.uic.ticket.api.spec.ILuggageRestriction#getMaxHandLuggagePieces()
	 */
	public int getMaxHandLuggagePieces() {
		return maxHandLuggagePieces;
	}
	
	/* (nicht-Javadoc)
	 * @see org.uic.ticket.api.spec.ILuggageRestriction#setMaxHandLuggagePieces(int)
	 */
	public void setMaxHandLuggagePieces(int maxHandLuggagePieces) {
		this.maxHandLuggagePieces = maxHandLuggagePieces;
	}
	
	/* (nicht-Javadoc)
	 * @see org.uic.ticket.api.spec.ILuggageRestriction#getMaxNonHandLuggagePieces()
	 */
	public int getMaxNonHandLuggagePieces() {
		return maxNonHandLuggagePieces;
	}
	
	/* (nicht-Javadoc)
	 * @see org.uic.ticket.api.spec.ILuggageRestriction#setMaxNonHandLuggagePieces(int)
	 */
	public void setMaxNonHandLuggagePieces(int maxNonHandLuggagePieces) {
		this.maxNonHandLuggagePieces = maxNonHandLuggagePieces;
	}
	
	/* (nicht-Javadoc)
	 * @see org.uic.ticket.api.spec.ILuggageRestriction#getRegisteredLuggage()
	 */
	public Collection<IRegisteredLuggage> getRegisteredLuggage() {
		return registeredLuggage;
	}
	
	/* (nicht-Javadoc)
	 * @see org.uic.ticket.api.spec.ILuggageRestriction#addRegisteredLuggage(org.uic.ticket.api.spec.IRegisteredLuggage)
	 */
	public void addRegisteredLuggage(IRegisteredLuggage registeredLuggage) {
		this.registeredLuggage.add(registeredLuggage);
	}
	
	
	
}