class Link extends Agent with api.Link with AgentColors

Source
Link.java
Linear Supertypes
AgentColors, api.Link, Agent, Comparable[Agent], api.Agent, AgentJ, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Link
  2. AgentColors
  3. Link
  4. Agent
  5. Comparable
  6. Agent
  7. AgentJ
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Link(world: World, end1: Turtle, end2: Turtle, arraySize: Int)

Value Members

  1. def agentBit(): Int
    Definition Classes
    LinkAgent
  2. def agentKey(): AnyRef
    Definition Classes
    LinkAgent
  3. def alpha(): Int

    0-255, 0 = invisible, 255 = opaque

    0-255, 0 = invisible, 255 = opaque

    Definition Classes
    LinkAgent
  4. def bothEnds(): AgentSet
  5. def classDisplayName(): String

    Returns a displayable name of this type of agent (Turtle, Link, Patch, Observer)

    Returns a displayable name of this type of agent (Turtle, Link, Patch, Observer)

    Definition Classes
    LinkAgentAgent
  6. def color(rgb: LogoList): Unit
  7. def color(): AnyRef

    Returns the value of the color variable, a Double or LogoList.

    Returns the value of the color variable, a Double or LogoList.

    Definition Classes
    LinkLink
  8. def colorDouble(boxedColor: Double): Unit
  9. def colorDoubleUnchecked(boxedColor: Double): Unit
  10. def compareTo(a: Agent): Int
    Definition Classes
    LinkAgent → Comparable
  11. def die(): Unit
  12. def end1(): Turtle

    Returns the first end point of this link.

    Returns the first end point of this link. If the link is directed this is the source turtle if the link is undirected it is the turtle with the lower who number.

    Definition Classes
    LinkLink
  13. def end2(): Turtle

    Returns the second end point of this link.

    Returns the second end point of this link. If the link is directed this is the destination turtle if the link is undirected it is the turtle with the higher who number.

    Definition Classes
    LinkLink
  14. def getBreed(): TreeAgentSet

    Returns the breed AgentSet associated with this link.

    Returns the breed AgentSet associated with this link. Iif the link is unbreeded returns the all links AgentSet.

    Definition Classes
    LinkLink
  15. def getBreedIndex(): Int

    Returns the index of the breed of this link.

    Returns the index of the breed of this link.

    Definition Classes
    LinkLink
  16. def getBreedVariable(name: String): AnyRef
    Definition Classes
    LinkAgent
  17. def getLinkBreedVariable(name: String): AnyRef
    Definition Classes
    LinkAgent
  18. def getLinkVariable(vn: Int): AnyRef
    Definition Classes
    LinkAgent
  19. def getLinkVariableDouble(vn: Int): Double
  20. def getPatchAtOffsets(dx: Double, dy: Double): Patch
    Definition Classes
    LinkAgent
  21. def getPatchVariable(vn: Int): AnyRef
    Definition Classes
    LinkAgent
  22. def getTurtleOrLinkVariable(varName: String): AnyRef
    Definition Classes
    LinkAgent
  23. def getTurtleVariable(vn: Int): AnyRef
    Definition Classes
    LinkAgent
  24. def getVariable(vn: Int): AnyRef

    Returns the value of the variable in the given position of the agent variable array

    Returns the value of the variable in the given position of the agent variable array

    vn

    the index into the agent variable array

    Definition Classes
    LinkAgentAgent
  25. def hasLabel(): Boolean

    Returns true if there is a value in the label variable.

    Returns true if there is a value in the label variable.

    Definition Classes
    LinkLink
  26. def heading(): Double

    Returns the heading towards end2 from end1.

    Returns the heading towards end2 from end1.

    Definition Classes
    LinkLink
  27. def hidden(hidden: Boolean): Unit
  28. def hidden(): Boolean

    Returns the value of the hidden? variable.

    Returns the value of the hidden? variable.

    Definition Classes
    LinkLink
  29. def id: Long

    Returns the id number of this agent.

    Returns the id number of this agent. The who number in the case of a turtle, index into the array in the case of patches

    Definition Classes
    AgentAgent
  30. def id_=(newId: Long): Unit
    Definition Classes
    Agent
  31. def isDirectedLink(): Boolean

    Returns true if this link is directed.

    Returns true if this link is directed.

    Definition Classes
    LinkLink
  32. def isTied(): Boolean
  33. def kind(): AgentKind

    Returns the kind of this agent (observer, turtle, patch, or link.

    Returns the kind of this agent (observer, turtle, patch, or link.

    Definition Classes
    LinkAgent
  34. def label(label: Any): Unit
  35. def label(): AnyRef
  36. def labelColor(rgb: LogoList): Unit
  37. def labelColor(labelColor: Double): Unit
  38. def labelColor(): AnyRef

    Returns the value of the label-color variable.

    Returns the value of the label-color variable.

    Definition Classes
    LinkLink
  39. def labelString(): String

    Returns the value of the label variable.

    Returns the value of the label variable.

    Definition Classes
    LinkLink
  40. def lineThickness(value: Double): Unit
  41. def lineThickness(): Double

    Returns the value of the thinkness variable.

    Returns the value of the thinkness variable.

    Definition Classes
    LinkLink
  42. def linkDestinationSize(): Double

    Returns the size of end2.

    Returns the size of end2.

    Definition Classes
    LinkLink
  43. def midpointX(): Double

    Returns the x-coordinate of the midpoint of this link taking wrapping in account.

    Returns the x-coordinate of the midpoint of this link taking wrapping in account.

    Definition Classes
    LinkLink
  44. def midpointY(): Double

    Returns the y-coordinate of the midpoint of this link taking wrapping in account.

    Returns the y-coordinate of the midpoint of this link taking wrapping in account.

    Definition Classes
    LinkLink
  45. def mode(mode: String): Unit
  46. def mode(): String
  47. def otherEnd(parent: Turtle): Turtle
  48. def realloc(oldProgram: Program, newProgram: Program): Agent
    Definition Classes
    LinkAgent
  49. def setBreed(breed: AgentSet): Unit
  50. def setBreedVariable(vn: Int, value: Double): Unit
  51. def setBreedVariable(name: String, value: Any): Unit
    Definition Classes
    LinkAgent
  52. def setId(newId: Long): Unit
    Definition Classes
    Agent
  53. def setLinkBreedVariable(name: String, value: Any): Unit
    Definition Classes
    LinkAgent
  54. def setLinkVariable(vn: Int, value: Any): Unit
    Definition Classes
    LinkAgent
  55. def setLinkVariable(vn: Int, value: Double): Unit
    Definition Classes
    LinkAgent
  56. def setPatchVariable(vn: Int, value: Double): Unit
    Definition Classes
    LinkAgent
  57. def setPatchVariable(vn: Int, value: Any): Unit
    Definition Classes
    LinkAgent
  58. def setTurtleOrLinkVariable(varName: String, value: Any): Unit
    Definition Classes
    LinkAgent
  59. def setTurtleVariable(vn: Int, value: Double): Unit
    Definition Classes
    LinkAgent
  60. def setTurtleVariable(vn: Int, value: Any): Unit
    Definition Classes
    LinkAgent
  61. def setVariable(vn: Int, value: Any): Unit

    Sets the variable in the position vn of the agent variable array to value

    Sets the variable in the position vn of the agent variable array to value

    vn

    the index into the agent variable array

    value

    the new value for the variable

    Definition Classes
    LinkAgentAgent
    Exceptions thrown

    api.AgentException If value is the wrong type for the given variable or if you try to change variables that cannot be changed

  62. def setVariables(v: Array[AnyRef]): Unit
    Definition Classes
    Agent
  63. def shape(shape: String): Unit
  64. def shape(): String

    Returns the name of the current shape

    Returns the name of the current shape

    Definition Classes
    LinkLinkAgent
  65. def size(): Double

    Returns the size of this agent

    Returns the size of this agent

    Definition Classes
    LinkAgent
  66. def toString(): String
    Definition Classes
    Link → AnyRef → Any
  67. def untie(): Unit
  68. def validRGBList(rgb: LogoList, allowAlpha: Boolean): Unit
    Definition Classes
    AgentColors
    Annotations
    @throws( classOf[AgentException] )
  69. def variableName(vn: Int): String

    Returns the name of the variable with the given index.

    Returns the name of the variable with the given index. Works for built-in, *-own, and breed variables.

    vn

    the index of the variable

    Definition Classes
    LinkAgent
  70. def variables: Array[AnyRef]

    Returns raw array of all agent variables.

    Returns raw array of all agent variables. Warning: this method is liable to change return type in a future API version.

    Definition Classes
    AgentAgent
  71. def variables_=(v: Array[AnyRef]): Unit
    Definition Classes
    Agent
  72. def world: World

    Returns the world object associated with this agent

    Returns the world object associated with this agent

    Definition Classes
    AgentAgent
  73. def x1(): Double

    Returns the x-coordinate of end1.

    Returns the x-coordinate of end1.

    Definition Classes
    LinkLink
  74. def x2(): Double

    Returns the x-coordinate of end2.

    Returns the x-coordinate of end2. This coordinate is "unwrapped" so it may actually be outside the bounds of the world.

    Definition Classes
    LinkLink
  75. def y1(): Double

    Returns the y-coordinate of end1.

    Returns the y-coordinate of end1.

    Definition Classes
    LinkLink
  76. def y2(): Double

    Returns the y-coordinate of end2.

    Returns the y-coordinate of end2. This coordinate is "unwrapped" so it may actually be outside the bounds of the world.

    Definition Classes
    LinkLink