AnyLogic
Expand
Font size
  • java.lang.Object
    • java.lang.Enum<SimpleDirection>
      • com.anylogic.engine.markup.SimpleDirection
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SimpleDirection>

@AnyLogicInternalAPI
public enum SimpleDirection
extends java.lang.Enum<SimpleDirection>

Enum Constant Summary

Enum Constants 
DIRECTION0  
DIRECTION1  
Enum Constant Description

Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
abstract Position getEndPosition​(IPath path, Position out)  
abstract INode getNextNode​(INode node)
Call this method for NodeType.TRANSIT nodes only
abstract INode getNextNode​(IPath path)  
abstract IPath getNextPath​(INode node)
Call this method for NodeType.TRANSIT nodes only
abstract double getOffsetOnPath​(double baseOffset, double relativeOffset)  
abstract double getOffsetOnPath​(IPath path, double distance)  
abstract Position getPositionAtOffset​(IPath path, double offset, Position out)  
abstract double getRemainingLength​(IPath path, double baseOffset)  
abstract SimpleDirection reverse()  
static SimpleDirection valueOf​(java.lang.String name)
Returns the enum constant of this type with the specified name.
static SimpleDirection[] values()
Returns an array containing the constants of this enum type, in the order they are declared.
Modifier and Type Method Description

Methods inherited from class java.lang.Enum

compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

Methods inherited from class java.lang.Object

getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

DIRECTION0

public static final SimpleDirection DIRECTION0

DIRECTION1

public static final SimpleDirection DIRECTION1

Method Detail

values

public static SimpleDirection[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SimpleDirection c : SimpleDirection.values())
    System.out.println(c);
Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SimpleDirection valueOf​(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getNextNode

public abstract INode getNextNode​(INode node)
Call this method for NodeType.TRANSIT nodes only
Parameters:
node - the node
Returns:
the next node in this direction

getNextPath

public abstract IPath getNextPath​(INode node)
Call this method for NodeType.TRANSIT nodes only
Parameters:
node - the node
Returns:
the connected path in this direction

getNextNode

public abstract INode getNextNode​(IPath path)

getOffsetOnPath

public abstract double getOffsetOnPath​(double baseOffset,
                                       double relativeOffset)

getRemainingLength

public abstract double getRemainingLength​(IPath path,
                                          double baseOffset)

reverse

public abstract SimpleDirection reverse()

getEndPosition

public abstract Position getEndPosition​(IPath path,
                                        Position out)

getOffsetOnPath

public abstract double getOffsetOnPath​(IPath path,
                                       double distance)

getPositionAtOffset

public abstract Position getPositionAtOffset​(IPath path,
                                             double offset,
                                             Position out)
How can we improve this article?