org.xmloperator.lambda2.net.impl
Class CellImpl

java.lang.Object
  extended byorg.xmloperator.lambda2.term.impl.TermImpl
      extended byorg.xmloperator.lambda2.term.impl.VariableImpl
          extended byorg.xmloperator.lambda2.net.impl.PortImpl
              extended byorg.xmloperator.lambda2.net.impl.CellImpl
All Implemented Interfaces:
Cell, Port, Term, Variable
Direct Known Subclasses:
BinaryCellImpl, DecoderImpl, EraserCellImpl, PentaryMultiplexorImpl, WireCellImpl

public abstract class CellImpl
extends PortImpl
implements Cell

Cell implementation. The Cell is amalgamated with its principal Port.


Field Summary
 
Fields inherited from interface org.xmloperator.lambda2.net.model.Cell
INTERACTION_ABSTRACTOR_APPLICATOR, INTERACTION_ANNIHILATION_CONSTRUCTOR, INTERACTION_ANNIHILATION_DUPLICATOR, INTERACTION_ANNIHILATION_ERASER, INTERACTION_APPLICATOR_DECODER, INTERACTION_CONSTRUCTOR_DUPLICATOR, INTERACTION_CONSTRUCTOR_DUPLICATOR_CONTRUCTORS, INTERACTION_DUPLICATING_ABSTRACTOR, INTERACTION_DUPLICATING_APPLICATOR, INTERACTION_DUPLICATING_DECODER, INTERACTION_ERASING_ABSTRACTOR, INTERACTION_ERASING_APPLICATOR, INTERACTION_ERASING_CONSTRUCTOR, INTERACTION_ERASING_DECODER, INTERACTION_ERASING_DUPLICATOR, INTERACTION_MERGING_DECODER, INTERACTION_MERGING_DECODERS, INTERACTION_SYMBOLS, INTERACTION_WIRE, SYMBOL_ABSTRACTOR, SYMBOL_APPLICATOR, SYMBOL_CONSTRUCTOR, SYMBOL_DECODER, SYMBOL_DUPLICATOR, SYMBOL_ERASER, SYMBOL_SYMBOLS, SYMBOL_WIRE
 
Fields inherited from interface org.xmloperator.lambda2.term.model.Term
TYPE_ABSTRACTION, TYPE_APPLICATION, TYPE_VARIABLE
 
Constructor Summary
CellImpl()
           
 
Method Summary
 void collectPorts(Stack portStack)
          Adds its ports to a given Stack.
 Port getPrincipalPort()
          Returns the principal port of this cell.
 boolean isBinaryCell()
          Returns true if this Cell is a binaryCell, i.e. a constructor or a duplicator.
 boolean isDecoder()
          Returns true if this Cell is a DecodingCell.
 boolean isEraser()
          Returns true if this Cell is an Eraser.
 boolean isPentaryMultiplexor()
          Returns true if this Cell is a PentaryMultiplexor, i.e. an Abstractor or an Applicator.
 boolean isWireCell()
          Returns true if this Cell is a WireCell.
 
Methods inherited from class org.xmloperator.lambda2.net.impl.PortImpl
connectTo, disconnect, getCell, getConnectedPort, getPortNumber, isConnected, isFree, isPrincipal
 
Methods inherited from class org.xmloperator.lambda2.term.impl.VariableImpl
getTermType, isVariable
 
Methods inherited from class org.xmloperator.lambda2.term.impl.TermImpl
buildAbstraction, buildAbstraction, buildAbstraction, buildApplication, buildApplication, freeVariables, isAbstraction, isApplication, toString, toText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xmloperator.lambda2.net.model.Cell
cloneCell, getPort, getSymbol, getSymbolArity, interact
 
Methods inherited from interface org.xmloperator.lambda2.term.model.Term
buildAbstraction, buildAbstraction, buildAbstraction, buildApplication, buildApplication, freeVariables, isAbstraction, isApplication, toText
 

Constructor Detail

CellImpl

public CellImpl()
Method Detail

isWireCell

public boolean isWireCell()
Description copied from interface: Cell
Returns true if this Cell is a WireCell.

Specified by:
isWireCell in interface Cell
Returns:
true if this Cell is a WireCell.

isEraser

public boolean isEraser()
Description copied from interface: Cell
Returns true if this Cell is an Eraser.

Specified by:
isEraser in interface Cell
Returns:
true if this Cell is an Eraser.

isBinaryCell

public boolean isBinaryCell()
Description copied from interface: Cell
Returns true if this Cell is a binaryCell, i.e. a constructor or a duplicator.

Specified by:
isBinaryCell in interface Cell
Returns:
true if this Cell is a binaryCell, i.e. a constructor or a duplicator.

isPentaryMultiplexor

public boolean isPentaryMultiplexor()
Description copied from interface: Cell
Returns true if this Cell is a PentaryMultiplexor, i.e. an Abstractor or an Applicator.

Specified by:
isPentaryMultiplexor in interface Cell
Returns:
true if this Cell is a PentaryMultiplexor, i.e. an Abstractor or an Applicator.

isDecoder

public boolean isDecoder()
Description copied from interface: Cell
Returns true if this Cell is a DecodingCell.

Specified by:
isDecoder in interface Cell
Returns:
true if this Cell is a DecodingCell.

getPrincipalPort

public final Port getPrincipalPort()
Description copied from interface: Cell
Returns the principal port of this cell. This an alias for getPort(0).

Specified by:
getPrincipalPort in interface Cell
Returns:
the principal port of this cell. This an alias for getPort(0).

collectPorts

public void collectPorts(Stack portStack)
Description copied from interface: Cell
Adds its ports to a given Stack.

Specified by:
collectPorts in interface Cell
Parameters:
portStack - a Stack of ports.