jpaul.DataStructs
Class RelFacts.MapSetRelationFactory<K,V>

java.lang.Object
  extended by jpaul.DataStructs.RelationFactory<K,V>
      extended by jpaul.DataStructs.RelFacts.MapSetRelationFactory<K,V>
All Implemented Interfaces:
Factory<Relation<K,V>>
Enclosing class:
RelFacts

Deprecated. As of jpaul 2.2, use RelFacts.mapSet() or RelFacts.mapSet(MapFactory,SetFactory) instead.

@Deprecated
public static class RelFacts.MapSetRelationFactory<K,V>
extends RelationFactory<K,V>

MapSetRelationFactory generates MapSetRelations that use a specific MapFactory and a specific SetFactory.


Constructor Summary
RelFacts.MapSetRelationFactory()
          Deprecated. Default constructor: creates a MapSetRelationFactory that generates relations whose representation uses LinkedHashMaps and LinkedHashSets.
RelFacts.MapSetRelationFactory(MapFactory<K,java.util.Set<V>> mapFact, SetFactory<V> setFact)
          Deprecated. Creates a MapSetRelationFactory that generates relations whose representation uses maps generated by mapFact and sets generated by setFact.
 
Method Summary
 Relation<K,V> create()
          Create a new object of class T.
 Relation<K,V> create(Relation<K,V> r)
          Default implementation: uses RelationFactory.create() to create an empty relation, and next add each pair from r to the new relation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelFacts.MapSetRelationFactory

public RelFacts.MapSetRelationFactory()
Deprecated. 
Default constructor: creates a MapSetRelationFactory that generates relations whose representation uses LinkedHashMaps and LinkedHashSets.


RelFacts.MapSetRelationFactory

public RelFacts.MapSetRelationFactory(MapFactory<K,java.util.Set<V>> mapFact,
                                      SetFactory<V> setFact)
Deprecated. 
Creates a MapSetRelationFactory that generates relations whose representation uses maps generated by mapFact and sets generated by setFact.

Method Detail

create

public Relation<K,V> create()
Description copied from interface: Factory
Create a new object of class T. Corresponds to a default constructor.

Specified by:
create in interface Factory<Relation<K,V>>
Specified by:
create in class RelationFactory<K,V>

create

public Relation<K,V> create(Relation<K,V> r)
Description copied from class: RelationFactory
Default implementation: uses RelationFactory.create() to create an empty relation, and next add each pair from r to the new relation.

Specified by:
create in interface Factory<Relation<K,V>>
Overrides:
create in class RelationFactory<K,V>


Copyright 2005 Alexandru Salcianu - salcianu@alum.mit.edu