Interface Attribute
-
- All Known Subinterfaces:
Attribute.CommonAttribute
,Attribute.DotAttribute
,Attribute.GmlAttribute
,Attribute.InvisibleAttribute
public interface Attribute
Basic interface for all attributes ofAbstractPlannerGraph.AbstractNode
as well asAbstractPlannerGraph.AbstractEdge
. Represents a tag object that annotates anAbstractPlannerGraph.AbstractNode
or anAbstractPlannerGraph.AbstractEdge
, providing additional information to aGraphExporter
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Attribute.CommonAttribute
Interface for attributes ofAbstractPlannerGraph.AbstractNode
as well asAbstractPlannerGraph.AbstractEdge
that are used to serialize to GML or to DOT.static interface
Attribute.DotAttribute
Interface for attributes ofAbstractPlannerGraph.AbstractNode
as well asAbstractPlannerGraph.AbstractEdge
that are used to serialize to DOT.static interface
Attribute.GmlAttribute
Basic interface all attributes ofAbstractPlannerGraph.AbstractNode
as well asAbstractPlannerGraph.AbstractEdge
that are use to serialize to GML.static interface
Attribute.InvisibleAttribute
Interface for attributes ofAbstractPlannerGraph.AbstractNode
as well asAbstractPlannerGraph.AbstractEdge
that are used to neither serialize to GML or to DOT.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Attribute.CommonAttribute
common(Object reference)
Static factory method to create an attribute based on a reference to some object.static Attribute.DotAttribute
dot(Object reference)
Static factory method to create a DOT attribute based on a reference to some object.Object
getReference()
Return the underlying object this attribute refers to.static Attribute.GmlAttribute
gml(Object reference)
Static factory method to create a GML attribute based on a reference to some object.static Attribute.InvisibleAttribute
invisible(Object reference)
Static factory method to create an attribute based on a reference to some object.<N,E>
booleanisVisible(GraphExporter.ExporterContext context)
Returns whether this method is visible in the given context.
-
-
-
Method Detail
-
isVisible
<N,E> boolean isVisible(@Nonnull GraphExporter.ExporterContext context)
Returns whether this method is visible in the given context.- Type Parameters:
N
- node typeE
- edge type- Parameters:
context
- the exporter context of the exporter being used- Returns:
true
if the attribute is semantic,false
otherwise.
-
getReference
@Nonnull Object getReference()
Return the underlying object this attribute refers to.- Returns:
- the object.
-
gml
@Nonnull static Attribute.GmlAttribute gml(@Nonnull Object reference)
Static factory method to create a GML attribute based on a reference to some object.- Parameters:
reference
- the reference- Returns:
- a new attribute that is only visible to the GML exporter
-
dot
@Nonnull static Attribute.DotAttribute dot(@Nonnull Object reference)
Static factory method to create a DOT attribute based on a reference to some object.- Parameters:
reference
- the reference- Returns:
- a new attribute that is only visible to the DOT exporter
-
common
@Nonnull static Attribute.CommonAttribute common(@Nonnull Object reference)
Static factory method to create an attribute based on a reference to some object.- Parameters:
reference
- the reference- Returns:
- a new attribute that is visible to all exporters
-
invisible
@Nonnull static Attribute.InvisibleAttribute invisible(@Nonnull Object reference)
Static factory method to create an attribute based on a reference to some object.- Parameters:
reference
- the reference- Returns:
- a new attribute that is invisible to all exporters. Attributes of this kind can only be used in variable substitutions.
-
-