|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orbital.logic.sign.concrete.Notation.NotationSpecification
public static class Notation.NotationSpecification
Contains the specification of the default notation for a compositor.
Constructor Summary | |
---|---|
Notation.NotationSpecification(int arity)
Create a very basic default notation specification of a compositor's notation. |
|
Notation.NotationSpecification(int precedence,
Notation notation,
int arity)
Create a specification of a compositor's notation. |
|
Notation.NotationSpecification(int precedence,
java.lang.String associativity)
Create a specification of a compositor's notation with automatic notation resolution. |
|
Notation.NotationSpecification(int precedence,
java.lang.String associativity,
Notation notation)
Create a specification of a compositor's notation. |
|
Notation.NotationSpecification(int precedence,
java.lang.String associativity,
Notation notation,
int arity)
Create a specification of a compositor's notation. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compares for precedence. |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getAssociativity()
Get the associativity specification of the sign. |
Notation |
getNotation()
Get the notation object to use for formatting. |
int |
getPrecedence()
Get the precedence of the sign (with 1 being the highest precedence). |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Notation.NotationSpecification(int precedence, java.lang.String associativity, Notation notation)
getAssociativity()
public Notation.NotationSpecification(int precedence, java.lang.String associativity, Notation notation, int arity)
getAssociativity()
public Notation.NotationSpecification(int precedence, Notation notation, int arity)
getAssociativity()
public Notation.NotationSpecification(int precedence, java.lang.String associativity)
This constructor will determine the notation object to use for formatting according to the associativity string which must be correct, then!
getAssociativity()
public Notation.NotationSpecification(int arity)
The default notation specification is
non-associative system default notation
of very strong precedence.
Method Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.lang.String toString()
toString
in class java.lang.Object
public int getPrecedence()
public java.lang.String getAssociativity()
xf, yf, xfx, xfy, yfx, yfy, fy, fx(and alike for compositors of arbitrary arity). Where
specification | effect |
---|---|
(unary) prefix notation | |
fx | unary prefix notation non-associative, i.e.,
f (f a) needs brackets |
fy | unary prefix notation associative, i.e.,
f f a needs no brackets but is taken to mean f (f a) |
(unary) postfix notation | |
xf | unary postfix notation non-associative, i.e.,
(a f) f needs brackets |
yf | unary postfix notation associative, i.e.,
a f f needs no brackets but is taken to mean a (a f) |
(binary) infix notation | |
yfx | left associative, i.e.,
a f b f c is taken to mean (a f b) f c , while
a f (b f c) needs brackets |
xfy | right associative, i.e.,
a f b f c is taken to mean a f (b f c) , while
(a f b) f c needs brackets |
xfx | non-associative, i.e., always use brackets |
yfy | full associative, i.e., never use brackets.
a f b f c is taken to mean either
(a f b) f c or a f (b f c) ,
as both are equivalent. |
The compositor position specification used must match the concept of notation objects.
public Notation getNotation()
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |