com.supermap.realspace

Class Routes

  • java.lang.Object
    • com.supermap.realspace.Routes


  • public class Routes
    extends java.lang.Object
    Route collection class. This class provides access to route objects. The route collection contains zero or more route objects.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Routes() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int add(Route value)
      Add a route object to the route collection.
      void clear()
      Clear all routes in the route collection.
      boolean contains(java.lang.String value)
      Confirm that the route with the specified name is included.
      boolean fromFile(java.lang.String value)
      Import a route collection object from the specified file.
      int getCount()
      Returns the number of routes in the route collection.
      Route getCurrentRoute()
      Get the currently selected route.
      int getCurrentRouteIndex()
      Returns the currently selected route index.
      java.lang.String getRouteName(int index)
      Get the route name by subscript.
      int indexOfName(java.lang.String value)
      Get the index of the route with the specified name.
      boolean remove()
      Removes the route object at the given index value from the route collection.
      void setCurrentRouteIndex(int index)
      Set the currently selected route index value.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Routes

        public Routes()
    • Method Detail

      • getCount

        public int getCount()
        Returns the number of routes in the route collection.
        Returns:
        The number of routes in the route collection.
      • getCurrentRoute

        public Route getCurrentRoute()
        Get the currently selected route.
        Returns:
        current route
      • getCurrentRouteIndex

        public int getCurrentRouteIndex()
        Returns the currently selected route index. If there is no Route by default, it is -1. After adding Route, it is no longer an illegal value.
        Returns:
        Currently selected route
      • setCurrentRouteIndex

        public void setCurrentRouteIndex(int index)
        Set the currently selected route index value. When there is no route by default, it is -1. After adding Route, it is no longer an illegal value.
        Parameters:
        index - The currently selected route
      • clear

        public void clear()
        Clear all routes in the route collection.
      • getRouteName

        public java.lang.String getRouteName(int index)
        Get the route name by subscript.
        Parameters:
        index - index
        Returns:
        The route name.
      • fromFile

        public boolean fromFile(java.lang.String value)
        Import a route collection object from the specified file.
        Parameters:
        value - The full path to the file specified.
        Returns:
        Returns true if the import succeeds, otherwise returns false.
      • add

        public int add(Route value)
        Add a route object to the route collection.
        Parameters:
        value - The added route object.
        Returns:
        The number of routes added to the route collection.
      • contains

        public boolean contains(java.lang.String value)
        Confirm that the route with the specified name is included.
        Parameters:
        value - The specified route name.
        Returns:
        A Boolean value, true indicates that the specified name exists, and false indicates that it does not exist.
      • indexOfName

        public int indexOfName(java.lang.String value)
        Get the index of the route with the specified name.
        Parameters:
        value - The specified route name.
        Returns:
        Specifies the index of the route to the name.
      • remove

        public boolean remove()
        Removes the route object at the given index value from the route collection.
        Returns:
        A Boolean value, true indicates that the route object was successfully removed, and false indicates that the route object was removed.