com.amazon.redshift.geometric

## Class RedshiftPath

- java.lang.Object
- - com.amazon.redshift.util.RedshiftObject
  - - com.amazon.redshift.geometric.RedshiftPath

All Implemented Interfaces:
  Serializable, Cloneable

    public class RedshiftPath
    extends RedshiftObject
    implements Serializable, Cloneable

This implements a path (a multiple segmented line, which may be closed).

See Also:
  Serialized Form

### Field Summary

Fields
`boolean` `open` True if the path is open, false if closed.
`RedshiftPoint[]` `points` The points defining this path.

### Fields inherited from class com.amazon.redshift.util.RedshiftObject

`type, value`

### Constructor Summary

Constructors
Constructor and Description
`RedshiftPath()` Required by the driver.
`RedshiftPath(RedshiftPoint[] points, boolean open)`
`RedshiftPath(String s)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `clone()` This must be overidden to allow the object to be cloned.
`void` `closePath()`
`boolean` `equals(Object obj)` This must be overidden to allow comparisons of objects.
`String` `getValue()` This returns the path in the syntax expected by com.amazon.redshift.
`int` `hashCode()` Compute hash.
`boolean` `isClosed()`
`boolean` `isOpen()`
`void` `openPath()`
`void` `setValue(String s)` This method sets the value of this object.

### Methods inherited from class com.amazon.redshift.util.RedshiftObject

`getType, setType, toString`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### open

    public boolean open

True if the path is open, false if closed.

#### points

    public RedshiftPoint[] points

The points defining this path.

### Constructor Detail

#### RedshiftPath

    public RedshiftPath(RedshiftPoint[] points,
                        boolean open)

Parameters:
  `points` - the RedshiftPoints that define the path
  `open` - True if the path is open, false if closed

#### RedshiftPath

    public RedshiftPath()

Required by the driver.

#### RedshiftPath

    public RedshiftPath(String s)
                 throws SQLException

Parameters:
  `s` - definition of the path in Redshift's syntax.
Throws:
  `SQLException` - on conversion failure

### Method Detail

#### setValue

    public void setValue(String s)
                  throws SQLException

Description copied from class: `RedshiftObject`
This method sets the value of this object. It must be overridden.

Overrides:
  `setValue` in class `RedshiftObject`
Parameters:
  `s` - Definition of the path in Redshift's syntax
Throws:
  `SQLException` - on conversion failure

#### equals

    public boolean equals(Object obj)

Description copied from class: `RedshiftObject`
This must be overidden to allow comparisons of objects.

Overrides:
  `equals` in class `RedshiftObject`
Parameters:
  `obj` - Object to compare with
Returns:
  true if the two paths are identical

#### hashCode

    public int hashCode()

Description copied from class: `RedshiftObject`
Compute hash. As equals() use only value. Return the same hash for the same value.

Overrides:
  `hashCode` in class `RedshiftObject`
Returns:
  Value hashcode, 0 if value is null `Objects.hashCode(Object)`

#### clone

    public Object clone()
                 throws CloneNotSupportedException

Description copied from class: `RedshiftObject`
This must be overidden to allow the object to be cloned.

Overrides:
  `clone` in class `RedshiftObject`
Throws:
  `CloneNotSupportedException`

#### getValue

    public String getValue()

This returns the path in the syntax expected by com.amazon.redshift.

Overrides:
  `getValue` in class `RedshiftObject`
Returns:
  the value of this object

#### isOpen

    public boolean isOpen()

#### isClosed

    public boolean isClosed()

#### closePath

    public void closePath()

#### openPath

    public void openPath()