## org.eclipse.amp.escape.ascape.adapt
Class AscapeModelProvider

    java.lang.Object
      org.eclipse.amp.escape.ascape.adapt.AscapeModelProvider

All Implemented Interfaces:
  ICompositionProvider, IGraphProvider, ILocationProvider

    public class AscapeModelProvider

extends java.lang.Object
implements ILocationProvider, IGraphProvider, ICompositionProvider

The Class AscapeProvider.

Constructor Summary
`AscapeModelProvider()`

Method Summary
`java.util.HashMap` `getAdjacencyMap(java.lang.Object scape)`
`java.lang.Class` `getChildrenClass(java.lang.Object member)` Provides the most specific class that the composition is guaranteed to contain.
`java.lang.Object` `getChildrenPrototype(java.lang.Object member)` Returns an exemplar object that characterizes the members of the composition.
`static AscapeModelProvider` `getDefault()`
`ILocation` `getExtent(java.lang.Object located)`
`java.lang.Iterable` `getIteratable(java.lang.Object object)` Gets the composition members for this level of the composition in iterable form.
`java.util.List` `getList(java.lang.Object parent)` Gets the composition members for this level of the composition as a list.
`ILocation` `getLocation(java.lang.Object located)`
`java.util.List` `getNeighborsFor(java.lang.Object scape, java.lang.Object source)`
`java.lang.Object` `getParent(java.lang.Object member)` Gets the list.
`org.ascape.model.space.Space` `getSpatialScape(org.ascape.model.Scape scape)` Gets the array2 d.
`boolean` `isChildrenComposition(java.lang.Object parent)` Indicates whether children of the provided object are themselves capable of providing composition members.
`boolean` `isComposition(java.lang.Object member)` Indicates whether this object is a composition, i.e.
`boolean` `isGraph(java.lang.Object graph)`
`boolean` `isMutable(java.lang.Object parent)` Checks if is mutable.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AscapeModelProvider

    public AscapeModelProvider()

Method Detail

### getLocation

    public ILocation getLocation(java.lang.Object located)

  Specified by:
    `getLocation` in interface `ILocationProvider`
  Parameters:
    `located` -
  Returns:
  See Also:
    `ILocationProvider.getLocation(java.lang.Object)`

### getExtent

    public ILocation getExtent(java.lang.Object located)

  Specified by:
    `getExtent` in interface `ILocationProvider`
  Parameters:
    `located` -
  Returns:
  See Also:
    `ILocationProvider.getExtent(java.lang.Object)`

### getSpatialScape

    public org.ascape.model.space.Space getSpatialScape(org.ascape.model.Scape scape)

  Gets the array2 d.

  Parameters:
    `scape` - the scape
  Returns:
    the array2 d

### getAdjacencyMap

    public java.util.HashMap getAdjacencyMap(java.lang.Object scape)

  Specified by:
    `getAdjacencyMap` in interface `IGraphProvider`
  Parameters:
    `graph` -
  Returns:
  See Also:
    `IGraphProvider.getAdjacencyMap(java.lang.Object)`

### getNeighborsFor

    public java.util.List getNeighborsFor(java.lang.Object scape,
                                          java.lang.Object source)

  Specified by:
    `getNeighborsFor` in interface `IGraphProvider`
  Parameters:
    `graph` -
    `source` -
  Returns:
  See Also:
    `IGraphProvider.getNeighborsFor(java.lang.Object, java.lang.Object)`

### isGraph

    public boolean isGraph(java.lang.Object graph)

  Specified by:
    `isGraph` in interface `IGraphProvider`
  Parameters:
    `graph` -
  Returns:
  See Also:
    `IGraphProvider.isGraph(java.lang.Object)`

### getIteratable

    public java.lang.Iterable getIteratable(java.lang.Object object)

  Description copied from interface: `ICompositionProvider`
  Gets the composition members for this level of the composition in iterable form. Note that as iterables allow just-in-time usage of the underlying objects and do not require size or index positions to be known, composition consumers should generally use this form for best performance whenever practical. (In the worst case, where only an iterable is known, a call to getList() may require providers to first build a list.) On the other hand, providers should simply provide the most efficient usage which in many cases will simply mean returning getList for this method.

  Specified by:
    `getIteratable` in interface `ICompositionProvider`
  Parameters:
    `hasIterable` -
  Returns:
  See Also:
    `ICompositionProvider.getIteratable(java.lang.Object)`

### getList

    public java.util.List getList(java.lang.Object parent)

  Description copied from interface: `ICompositionProvider`
  Gets the composition members for this level of the composition as a list. Consumers should generally use getIterable(), see above.

  Specified by:
    `getList` in interface `ICompositionProvider`
  Parameters:
    `parent` -
  Returns:
  See Also:
    `ICompositionProvider.getList(java.lang.Object)`

### isMutable

    public boolean isMutable(java.lang.Object parent)

  Description copied from interface: `ICompositionProvider`
  Checks if is mutable.

  Specified by:
    `isMutable` in interface `ICompositionProvider`
  Parameters:
    `parent` -
  Returns:
  See Also:
    `ICompositionProvider.isMutable(java.lang.Object)`

### getParent

    public java.lang.Object getParent(java.lang.Object member)

  Description copied from interface: `ICompositionProvider`
  Gets the list.

  Specified by:
    `getParent` in interface `ICompositionProvider`
  Returns:
    the list

### isChildrenComposition

    public boolean isChildrenComposition(java.lang.Object parent)

  Description copied from interface: `ICompositionProvider`
  Indicates whether children of the provided object are themselves capable of providing composition members. If not, we can assume that they represent the leaves of the composition structure.

  Specified by:
    `isChildrenComposition` in interface `ICompositionProvider`
  Returns:
    true if any children of the parent object's level are themselves compositions.

### getChildrenClass

    public java.lang.Class getChildrenClass(java.lang.Object member)

  Description copied from interface: `ICompositionProvider`
  Provides the most specific class that the composition is guaranteed to contain. For cases where no common base class exists, should simply return Object.class.

  Specified by:
    `getChildrenClass` in interface `ICompositionProvider`
  Parameters:
    `member` -
  Returns:
  See Also:
    `ICompositionProvider.getChildrenClass(java.lang.Object)`

### getChildrenPrototype

    public java.lang.Object getChildrenPrototype(java.lang.Object member)

  Description copied from interface: `ICompositionProvider`
  Returns an exemplar object that characterizes the members of the composition. This is useful for constraining the composition beyond type to state. For example, a prototype may help consumers specialize on the case for Foo.class where foo.bar > 10. Consumers should handle the case where prototype object is null, falling back to specializing on child class.

  Specified by:
    `getChildrenPrototype` in interface `ICompositionProvider`
  Parameters:
    `member` -
  Returns:
  See Also:
    `ICompositionProvider.getChildrenPrototype(java.lang.Object)`

### getDefault

    public static AscapeModelProvider getDefault()

### isComposition

    public boolean isComposition(java.lang.Object member)

  Description copied from interface: `ICompositionProvider`
  Indicates whether this object is a composition, i.e. contains other members. If not, it will be assumed to be a model leaf.

  Specified by:
    `isComposition` in interface `ICompositionProvider`
  Parameters:
    `member` -
  Returns:
  See Also:
    `ICompositionProvider.isComposition(java.lang.Object)`