From 254ee6f47eebfc00462c10756a92066e82cc1a96 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Tue, 21 Jun 2011 15:46:02 +0200 Subject: Initial commit --- .../c2kernel/collection/AggregationInstance.java | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 source/com/c2kernel/collection/AggregationInstance.java (limited to 'source/com/c2kernel/collection/AggregationInstance.java') diff --git a/source/com/c2kernel/collection/AggregationInstance.java b/source/com/c2kernel/collection/AggregationInstance.java new file mode 100755 index 0000000..0fbbf71 --- /dev/null +++ b/source/com/c2kernel/collection/AggregationInstance.java @@ -0,0 +1,45 @@ +package com.c2kernel.collection; + +/** + * @version $Revision: 1.30 $ $Date: 2003/06/04 13:21:24 $ + * @author $Author: abranson $ + */ + +import com.c2kernel.graph.model.GraphPoint; +import com.c2kernel.utils.CastorHashMap; + +public class AggregationInstance extends Aggregation +{ + + public AggregationInstance() + { + setName("AggregationInstance"); + mMembers = new CollectionMemberList(); + } + + public AggregationInstance(String name) + { + setName(name); + mMembers = new CollectionMemberList(); + } + + + public void addMember(int entityKey, CastorHashMap props, String classProps) + throws MembershipException + { + if( entityKey!=-1 && exists(entityKey)) + throw new MembershipException(entityKey+" already exists in this collection."); + else + super.addMember(entityKey, props, classProps); + } + + public void addMember(int entityKey, CastorHashMap props, String classProps, GraphPoint location, int w, int h) + throws MembershipException + { + if( entityKey!=-1 && exists(entityKey)) + throw new MembershipException(entityKey+" already exists in this collection."); + else + super.addMember(entityKey, props, classProps, location, w, h); + } +} + -- cgit v1.2.3