java.lang.Cloneable, java.lang.Iterable<java.lang.Object>public class LMap extends LRel implements java.lang.Cloneable
USEJOLLYTOKEN| Constructor | Description |
|---|---|
LMap() |
Constructs an unspecified logical map with default name.
|
LMap(java.lang.String name) |
Constructs an unbound logical map with given name.
|
LMap(java.lang.String name,
java.util.Set<LPair> set) |
Constructs a bound and closed logical map whose elements are those in
set and with a given name. |
LMap(java.lang.String name,
LMap lMap) |
Constructs a logical map which is equal to the parameter
lMap and with given name. |
LMap(java.util.Set<LPair> set) |
Constructs a bound and closed logical map whose elements are those in
set and with a default name. |
LMap(LMap lMap) |
Constructs a logical map which is equal to the parameter
lMap and with default name. |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Object |
accept(jsetl.Visitor visitor) |
Implementation of this method is needed for the Visitor design pattern.
|
LMap |
clone() |
Creates a bit-by-bit clone of this
LMap. |
Constraint |
comp(LMap lMap1,
LMap lMap2) |
This method creates the "comp" constraint which requires that
this comp lMap1 = lMap2. |
Constraint |
dom(LSet dom) |
This method creates the "dom" constraint.
|
static LMap |
empty() |
Creates an empty
LMap. |
LMap |
ins(LPair lPair) |
Creates and returns a new logical map obtained from the union of
this with {lPair}. |
LMap |
ins(LPair... lPairs) |
Creates and returns a new logical map obtained from the union of
this with the set of lPairs. |
LMap |
insAll(java.util.ArrayList<LPair> newElements) |
Creates and returns a new logical set obtained from this by adding all
elements of the parameter
newElements. |
LMap |
insAll(LPair[] lPairs) |
Creates and returns a new logical map obtained from this by adding all
elements of the parameter
lPairs. |
Constraint |
pfun() |
This method creates the "pfun" constraint, which is satisfied if
and only if
this represents a partial function. |
Constraint |
ran(LSet ran) |
This method creates the "ran" constraint.
|
LMap |
setName(java.lang.String name) |
Sets the name of this
LMap to name. |
forallElems, isClosed, isEmpty, isGround, iterator, testContains, toArraycomp, dres, getValue, id, id, inv, ncomp, ndom, ndres, nid, ninv, nran, nrres, rres, setValuecontains, diff, diff, diff, diff, disj, disj, eq, eq, equals, getSize, getTail, ins, insAll, insAll, inters, inters, inters, inters, less, less, less, less, mkSet, ncontains, ndiff, ndiff, ndiff, ndiff, ndisj, ndisj, neq, neq, ninters, ninters, ninters, ninters, normalizeSet, nsubset, nsubset, nunion, nunion, nunion, nunion, occurs, printElems, size, size, subset, subset, toString, union, union, union, unionpublic LMap()
public LMap(@NotNull java.lang.String name)
name - name of the logical map.public LMap(@NotNull java.util.Set<LPair> set)
set and with a default name.set - a java set whose elements will be the elements of the constructed logical map.
It must not contain null values.java.lang.NullPointerException - if set contains null values.NotPFunException - if set does not represent a partial function.public LMap(@NotNull java.lang.String name, @NotNull java.util.Set<LPair> set)
set and with a given name.set - a java set whose elements will be the elements of the constructed logical map.
It must not contain null values.name - the name of the logical map.java.lang.NullPointerException - if set contains null values.NotPFunException - if set does not represent a partial function.public LMap(@NotNull LMap lMap)
lMap and with default name.
This constructor is equivalent to solving the constraint this.eq(lMap).lMap - the logical map to which the constructed logical map is equal.public LMap(@NotNull java.lang.String name, @NotNull LMap lMap)
lMap and with given name.
This constructor is equivalent to solving the constraint this.eq(lMap).name - name of the logical map.lMap - the map to which the constructed logical map is equal.@Nullable public java.lang.Object accept(@NotNull jsetl.Visitor visitor)
@NotNull public LMap setName(@NotNull java.lang.String name)
LMap to name.@NotNull public LMap ins(@NotNull LPair lPair)
this with {lPair}.
The invocation object is not modified.@NotNull public LMap ins(@NotNull LPair... lPairs)
this with the set of lPairs.
The invocation object is not modified.ins in class LRellPairs - the logical pairs to use when creating the new set. None of its elements can be nulllPairs to this logical map.java.lang.NullPointerException - if some of the elements in lPairs are null.@NotNull public LMap insAll(@NotNull LPair[] lPairs)
lPairs. Does not modify this logical map.@NotNull public LMap insAll(@NotNull java.util.ArrayList<LPair> newElements)
newElements. Does not modify this logical map.@NotNull public Constraint pfun()
this represents a partial function.
Note: this constraint should be posted together with other methods such as
"eq", "in" and so on to ensure that the logical map still represents a
partial function even after the resolution of those constraints (which don't
take into account the nature of partial function of the objects of class LMAp.@NotNull public Constraint dom(@NotNull LSet dom)
@NotNull public Constraint ran(@NotNull LSet ran)
@NotNull public Constraint comp(@NotNull LMap lMap1, @NotNull LMap lMap2)
this comp lMap1 = lMap2.lMap1 - second argument of the functional composition.lMap2 - result of the functional composition.