public static final class TraitContainer.TraitHashMap extends java.lang.Object implements TraitContainer
TraitContainer.TraitHashMapEMPTY| Modifier and Type | Method and Description |
|---|---|
java.util.Map<ShapeId,java.util.Map<ShapeId,Trait>> |
getTraitsAppliedToPrelude()
Gets all traits applied to the prelude.
|
java.util.Map<ShapeId,Trait> |
getTraitsForShape(ShapeId shape)
Gets the traits applied to a shape.
|
void |
onTrait(ShapeId target,
ShapeId traitId,
Node value)
Create and add a trait.
|
void |
onTrait(ShapeId target,
Trait value)
Add a trait.
|
java.util.Map<ShapeId,java.util.Map<ShapeId,Trait>> |
traits() |
public java.util.Map<ShapeId,java.util.Map<ShapeId,Trait>> traits()
traits in interface TraitContainerpublic java.util.Map<ShapeId,Trait> getTraitsForShape(ShapeId shape)
TraitContainergetTraitsForShape in interface TraitContainershape - Shape to get the traits of.public java.util.Map<ShapeId,java.util.Map<ShapeId,Trait>> getTraitsAppliedToPrelude()
TraitContainergetTraitsAppliedToPrelude in interface TraitContainerpublic void onTrait(ShapeId target, Trait value)
TraitContaineronTrait in interface TraitContainertarget - Shape to add the trait to.value - Trait to add.public void onTrait(ShapeId target, ShapeId traitId, Node value)
TraitContaineronTrait in interface TraitContainertarget - Shape to add the trait to.traitId - Trait shape ID to create.value - The value to assign to the trait.