public class

ViewEdges

extends Object
java.lang.Object
   ↳ sofia.graphics.ViewEdges

Class Overview

Represents one or more of the four edges of a view, used with collision detection.

Summary

Public Constructors
ViewEdges(boolean left, boolean top, boolean right, boolean bottom)
Creates a new ViewEdges object that includes the specified edges.
Public Methods
boolean any()
Gets a value indicating whether the receiver includes any edge.
boolean bottom()
Gets a value indicating whether the receiver includes the bottom edge.
ViewEdges clone()
Creates a copy of the receiver that represents the same edges as the original.
boolean equals(Object other)
Compares two ViewEdges objects and returns a value indicating whether or not they represent exactly the same edges.
int hashCode()
boolean horizontal()
Gets a value indicating whether the receiver includes any horizontal edge; that is, the top or the bottom edge.
boolean left()
Gets a value indicating whether the receiver includes the left edge.
boolean right()
Gets a value indicating whether the receiver includes the right edge.
String toString()
boolean top()
Gets a value indicating whether the receiver includes the top edge.
boolean vertical()
Gets a value indicating whether the receiver includes any vertical edge; that is, the left or the right edge.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ViewEdges (boolean left, boolean top, boolean right, boolean bottom)

Creates a new ViewEdges object that includes the specified edges.

Parameters
left true to include the left edge
top true to include the top edge
right true to include the right edge
bottom true to include the bottom edge

Public Methods

public boolean any ()

Gets a value indicating whether the receiver includes any edge.

Returns
  • true if the receiver includes any edge, otherwise false

public boolean bottom ()

Gets a value indicating whether the receiver includes the bottom edge.

Returns
  • true if the receiver includes the bottom edge, otherwise false

public ViewEdges clone ()

Creates a copy of the receiver that represents the same edges as the original.

Returns
  • a copy of the receiver

public boolean equals (Object other)

Compares two ViewEdges objects and returns a value indicating whether or not they represent exactly the same edges.

Parameters
other the other object to compare
Returns
  • true if the other object represents the same edges, otherwise false

public int hashCode ()

public boolean horizontal ()

Gets a value indicating whether the receiver includes any horizontal edge; that is, the top or the bottom edge.

Returns
  • true if the receiver includes the top or bottom edge, otherwise false

public boolean left ()

Gets a value indicating whether the receiver includes the left edge.

Returns
  • true if the receiver includes the left edge, otherwise false

public boolean right ()

Gets a value indicating whether the receiver includes the right edge.

Returns
  • true if the receiver includes the right edge, otherwise false

public String toString ()

public boolean top ()

Gets a value indicating whether the receiver includes the top edge.

Returns
  • true if the receiver includes the top edge, otherwise false

public boolean vertical ()

Gets a value indicating whether the receiver includes any vertical edge; that is, the left or the right edge.

Returns
  • true if the receiver includes the left or right edge, otherwise false