Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 3aab2c9ffaa4670061dad15d7a89ec4622e27a3a (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package org.eclipse.equinox.internal.p2.metadata;

import org.eclipse.equinox.internal.provisional.p2.metadata.*;

public class ORRequirement implements IRequiredCapability {
	private IRequiredCapability[] oredRequirements;

	public ORRequirement(IRequiredCapability[] reqs) {
		oredRequirements = reqs;
	}

	public IRequiredCapability[] getRequirements() {
		return oredRequirements;
	}

	public String getFilter() {
		// TODO Auto-generated method stub
		return null;
	}

	public String getName() {
		// TODO Auto-generated method stub
		return null;
	}

	public String getNamespace() {
		// TODO Auto-generated method stub
		return null;
	}

	public VersionRange getRange() {
		// TODO Auto-generated method stub
		return null;
	}

	public String[] getSelectors() {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean isGreedy() {
		// TODO Auto-generated method stub
		return true;
	}

	public boolean isMultiple() {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean isOptional() {
		return false;
	}

	public void setFilter(String filter) {
		// TODO Auto-generated method stub

	}

	public void setSelectors(String[] selectors) {
		// TODO Auto-generated method stub

	}

	public boolean isNegation() {
		return false;
	}

	public String toString() {
		String result = "OR(";
		for (int i = 0; i < oredRequirements.length; i++) {
			result += oredRequirements[i].toString();
		}
		return result + ")";
	}

	public boolean satisfiedBy(IProvidedCapability cap) {
		for (int i = 0; i < oredRequirements.length; i++) {
			boolean result = oredRequirements[i].satisfiedBy(cap);
			if (result)
				return true;
		}
		return false;
	}
}

Back to the top