org.planx.msd.graph
Class TemplateNode<N,L>

java.lang.Object
  extended by org.planx.util.Association<N,List<TemplateNode.Pointer>>
      extended by org.planx.msd.graph.TemplateNode<N,L>
All Implemented Interfaces:
EquivalenceClassDiscriminable, Pair<N,List<TemplateNode.Pointer>>

public class TemplateNode<N,L>
extends Association<N,List<TemplateNode.Pointer>>
implements EquivalenceClassDiscriminable

Author:
Thomas Ambus

Nested Class Summary
 class TemplateNode.Pointer
           
protected  class TemplateNode.TemplateNavigator
           
 
Field Summary
protected  EquivalenceClass eqCls
           
protected  int height
           
protected  Discriminator<L> labelDisc
           
protected  Discriminator<N> nameDisc
           
protected  Object visitToken
           
 
Fields inherited from class org.planx.util.Association
first, second
 
Constructor Summary
TemplateNode(N name)
           
TemplateNode(N name, List<TemplateNode.Pointer> pointers)
           
TemplateNode(N name, List<TemplateNode.Pointer> pointers, Discriminator<N> nameDisc, Discriminator<L> labelDisc)
           
 
Method Summary
 void compact()
           
 TemplateNode.Pointer createPointer(L label, TemplateNode<N,L> node)
           
 Discriminator<TemplateNode<N,L>> getDiscriminator()
           
 EquivalenceClass getEquivalenceClass()
          Returns the EquivalenceClass that this object belongs to.
 N getName()
           
 Navigator<TemplateNode<N,L>> getNavigator()
          Returns a Navigator for TemplateNode objects.
 List<TemplateNode.Pointer> getPointers()
           
 void setEquivalenceClass(EquivalenceClass eqCls)
          Changes the EquivalenceClass of this object to the specified EquivalenceClass (optional operation).
 void setName(N name)
           
 void setPointers(List<TemplateNode.Pointer> pointers)
           
 
Methods inherited from class org.planx.util.Association
equals, getFirst, getSecond, hashCode, setFirst, setSecond, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

nameDisc

protected Discriminator<N> nameDisc

labelDisc

protected Discriminator<L> labelDisc

eqCls

protected EquivalenceClass eqCls

visitToken

protected Object visitToken

height

protected int height
Constructor Detail

TemplateNode

public TemplateNode(N name)

TemplateNode

public TemplateNode(N name,
                    List<TemplateNode.Pointer> pointers)

TemplateNode

public TemplateNode(N name,
                    List<TemplateNode.Pointer> pointers,
                    Discriminator<N> nameDisc,
                    Discriminator<L> labelDisc)
Method Detail

createPointer

public TemplateNode.Pointer createPointer(L label,
                                          TemplateNode<N,L> node)

compact

public void compact()

getName

public N getName()

setName

public void setName(N name)

getPointers

public List<TemplateNode.Pointer> getPointers()

setPointers

public void setPointers(List<TemplateNode.Pointer> pointers)

getEquivalenceClass

public EquivalenceClass getEquivalenceClass()
Description copied from interface: EquivalenceClassDiscriminable
Returns the EquivalenceClass that this object belongs to.

Specified by:
getEquivalenceClass in interface EquivalenceClassDiscriminable

setEquivalenceClass

public void setEquivalenceClass(EquivalenceClass eqCls)
Description copied from interface: EquivalenceClassDiscriminable
Changes the EquivalenceClass of this object to the specified EquivalenceClass (optional operation). If this operation is not supported an UnsupportedOperationException will be thrown.

Specified by:
setEquivalenceClass in interface EquivalenceClassDiscriminable

getDiscriminator

public Discriminator<TemplateNode<N,L>> getDiscriminator()

getNavigator

public Navigator<TemplateNode<N,L>> getNavigator()
Returns a Navigator for TemplateNode objects.



Copyright © 2010. All Rights Reserved.