litesoft
Diff Revisions
947
vs
948
for /trunk/Java/KeyHole/src/org/litesoft/aokeyhole/objects/ASet.java
|
@@ -3,53 +3,43 @@ |
3 |
3 |
|
|
4 |
4 |
|
import java.util.*; |
5 |
5 |
|
|
6 |
|
- |
public class ASet |
7 |
|
- |
{ |
|
6 |
+ |
public class ASet { |
8 |
7 |
|
private Set<String> mAcceptablePOtypes = new HashSet<String>(); |
9 |
8 |
|
private PropertyMetaData[] mPMDs; |
10 |
9 |
|
private AttributeCreationCallBack mCreationCallBack = null; |
11 |
10 |
|
|
12 |
|
- |
public ASet( PropertyMetaData... pPMDs ) |
13 |
|
- |
{ |
|
11 |
+ |
public ASet( PropertyMetaData... pPMDs ) { |
14 |
12 |
|
mPMDs = (pPMDs != null) ? pPMDs : PropertyMetaData.EMPTY_ARRAY; |
15 |
13 |
|
} |
16 |
14 |
|
|
17 |
|
- |
public ASet( String pAcceptablePOtype, PropertyMetaData... pPMDs ) |
18 |
|
- |
{ |
|
15 |
+ |
public ASet( String pAcceptablePOtype, PropertyMetaData... pPMDs ) { |
19 |
16 |
|
this( pPMDs ); |
20 |
|
- |
if ( pAcceptablePOtype != null ) |
21 |
|
- |
{ |
|
17 |
+ |
if ( pAcceptablePOtype != null ) { |
22 |
18 |
|
mAcceptablePOtypes.add( pAcceptablePOtype ); |
23 |
19 |
|
} |
24 |
20 |
|
} |
25 |
21 |
|
|
26 |
|
- |
public ASet( Set<String> pAcceptablePOtypes, PropertyMetaData... pPMDs ) |
27 |
|
- |
{ |
|
22 |
+ |
public ASet( Set<String> pAcceptablePOtypes, PropertyMetaData... pPMDs ) { |
28 |
23 |
|
this( pPMDs ); |
29 |
|
- |
if ( pAcceptablePOtypes != null ) |
30 |
|
- |
{ |
|
24 |
+ |
if ( pAcceptablePOtypes != null ) { |
31 |
25 |
|
mAcceptablePOtypes.addAll( pAcceptablePOtypes ); |
32 |
26 |
|
} |
33 |
27 |
|
} |
34 |
28 |
|
|
35 |
|
- |
public PropertyMetaData[] getPMDs() |
36 |
|
- |
{ |
|
29 |
+ |
public PropertyMetaData[] getPMDs() { |
37 |
30 |
|
return mPMDs; |
38 |
31 |
|
} |
39 |
32 |
|
|
40 |
|
- |
public AttributeCreationCallBack getCreationCallBack() |
41 |
|
- |
{ |
|
33 |
+ |
public AttributeCreationCallBack getCreationCallBack() { |
42 |
34 |
|
return mCreationCallBack; |
43 |
35 |
|
} |
44 |
36 |
|
|
45 |
|
- |
public ASet set( AttributeCreationCallBack pCreationCallBack ) |
46 |
|
- |
{ |
|
37 |
+ |
public ASet set( AttributeCreationCallBack pCreationCallBack ) { |
47 |
38 |
|
mCreationCallBack = pCreationCallBack; |
48 |
39 |
|
return this; |
49 |
40 |
|
} |
50 |
41 |
|
|
51 |
|
- |
public boolean isAcceptableAsRelatedTo( ObjectMetaData pObjectMetaData ) |
52 |
|
- |
{ |
|
42 |
+ |
public boolean isAcceptableAsRelatedTo( ObjectMetaData pObjectMetaData ) { |
53 |
43 |
|
return mAcceptablePOtypes.isEmpty() || mAcceptablePOtypes.contains( pObjectMetaData.getObjectSet().getType() ); |
54 |
44 |
|
} |
55 |
45 |
|
} |