|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.cs.crystal.flow.LabeledResult<LE>
LE
- The type which represents the lattice valuepublic class LabeledResult<LE>
Maps each label to a unique value. This class also contains a default value, so if a label is requested which it does not know about, it returns the default. Of all the IResults, this class provides the most expressiveness.
Method Summary | ||
---|---|---|
static
|
createResult(LE defaultValue)
Create a result with the given default value but no labels. |
|
static
|
createResult(List<ILabel> labels,
LE defaultValue)
Create a result for the given labels with the given default value. |
|
LE |
get(ILabel label)
Clients should not modify the returned value. |
|
IResult<LE> |
join(IResult<LE> otherResult,
IAbstractLatticeOperations<LE,?> op)
Clients do not usually call this method. |
|
Set<ILabel> |
keySet()
Returns the set of labels mapped by this IResult . |
|
void |
put(ILabel label,
LE value)
Add/Change the value of a label |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <LE> LabeledResult<LE> createResult(List<ILabel> labels, LE defaultValue)
LE
- labels
- The labels to create mappings fordefaultValue
- a default value for each label to map to
public static <LE> LabeledResult<LE> createResult(LE defaultValue)
LE
- defaultValue
- a default value for each label to map to
public void put(ILabel label, LE value)
label
- the label to add to this resultvalue
- the lattice information to map it topublic LE get(ILabel label)
IResult
label
is null
.
get
in interface IResult<LE>
public Set<ILabel> keySet()
IResult
IResult
.
keySet
in interface IResult<LE>
public IResult<LE> join(IResult<LE> otherResult, IAbstractLatticeOperations<LE,?> op)
IResult
IResult
objects passed in.
join
in interface IResult<LE>
otherResult
- IResult
object to join this IResult
with.op
- Lattice operations so we can join individual elements.
ILatticeOperations.join(LE, LE, org.eclipse.jdt.core.dom.ASTNode)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |