org.rubato.math.yoneda
Class DenotatorReference

java.lang.Object
  extended by org.rubato.math.yoneda.AbstractConnectableYoneda
      extended by org.rubato.math.yoneda.Denotator
          extended by org.rubato.math.yoneda.DenotatorReference
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Denotator>, java.lang.Iterable<Denotator>, Connectable, Yoneda

public final class DenotatorReference
extends Denotator

A placeholder for denotators that are not yet known. Mainly used during parsing.

Author:
Gérard Milmeister
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.rubato.math.yoneda.Yoneda
COLIMIT, LIMIT, LIST, POWER, SIMPLE
 
Constructor Summary
DenotatorReference(NameDenotator name)
           
DenotatorReference(java.lang.String name)
           
 
Method Summary
 Denotator at(ModuleElement element)
          If not null-addressed returns a new denotator evaluated at address element.
 Denotator changeAddress(Module newAddress)
          Makes an address change.
 Denotator changeAddress(ModuleMorphism morphism)
          Makes an address change using a module morphism.
 boolean check()
          Returns true iff this denotator is consistent.
 int compareTo(Denotator object)
           
 DenotatorReference copy()
          Returns a deep copy of this denotator.
 boolean equals(java.lang.Object object)
          Checks for equality.
 int getType()
          Returns the type of the denotator.
 boolean isConstant()
          Returns true iff this is ultimately a constant denotator, regardless of its address.
 java.util.Iterator<Denotator> iterator()
          Returns an iterator over the coordinates of this denotator.
 Denotator namedCopy(NameDenotator name)
          Makes a shallow copy this denotator and gives it the specified name.
 java.lang.String toString()
          Returns a string representation of this denotator.
 void toXML(XMLWriter writer)
           
 
Methods inherited from class org.rubato.math.yoneda.Denotator
atNull, clone, display, display, formEquals, get, getAddress, getCoordinate, getDependencies, getElement, getForm, getFrameCoordinate, getModuleMorphism, getName, getNameString, hasForm, hashCode, map, nameCompareTo, nameEquals, nullAddressed, replace, resolveReferences, setName, setNameString
 
Methods inherited from class org.rubato.math.yoneda.AbstractConnectableYoneda
getConnector, setConnector
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DenotatorReference

public DenotatorReference(java.lang.String name)

DenotatorReference

public DenotatorReference(NameDenotator name)
Method Detail

getType

public int getType()
Description copied from class: Denotator
Returns the type of the denotator.

Specified by:
getType in class Denotator
Returns:
type as an integer

namedCopy

public Denotator namedCopy(NameDenotator name)
Description copied from class: Denotator
Makes a shallow copy this denotator and gives it the specified name.

Specified by:
namedCopy in class Denotator

copy

public DenotatorReference copy()
Description copied from class: Denotator
Returns a deep copy of this denotator. The copy is given the same name as the original.

Specified by:
copy in class Denotator

equals

public boolean equals(java.lang.Object object)
Description copied from class: Denotator
Checks for equality.

Specified by:
equals in class Denotator

compareTo

public int compareTo(Denotator object)
Specified by:
compareTo in interface java.lang.Comparable<Denotator>
Specified by:
compareTo in class Denotator

at

public Denotator at(ModuleElement element)
Description copied from class: Denotator
If not null-addressed returns a new denotator evaluated at address element. If null-addressed, returns self.

Specified by:
at in class Denotator
Parameters:
element - address
Returns:
evaluated denotator

changeAddress

public Denotator changeAddress(Module newAddress)
Description copied from class: Denotator
Makes an address change.

Specified by:
changeAddress in class Denotator
Parameters:
newAddress - the new address of the denotator
Returns:
a copy of this denotator with the new address or null if address change fails

changeAddress

public Denotator changeAddress(ModuleMorphism morphism)
Description copied from class: Denotator
Makes an address change using a module morphism.

Specified by:
changeAddress in class Denotator
Parameters:
morphism - the address changing morphism
Returns:
a copy of this denotator with the new address or null if address change fails

isConstant

public boolean isConstant()
Description copied from class: Denotator
Returns true iff this is ultimately a constant denotator, regardless of its address.

Specified by:
isConstant in class Denotator

iterator

public java.util.Iterator<Denotator> iterator()
Description copied from class: Denotator
Returns an iterator over the coordinates of this denotator.

Specified by:
iterator in interface java.lang.Iterable<Denotator>
Specified by:
iterator in class Denotator

check

public boolean check()
Description copied from class: Denotator
Returns true iff this denotator is consistent. This can be used in assertions to validate a denotator, for example if its constructed using unsafe methods or changed inplace.

Specified by:
check in class Denotator

toXML

public void toXML(XMLWriter writer)
Specified by:
toXML in class Denotator

toString

public java.lang.String toString()
Description copied from class: Denotator
Returns a string representation of this denotator. This string is not parseable and does not contain all information. It is only meant for information purposes.

Overrides:
toString in class Denotator