## com.bbn.openmap.layer.vpf
Class CoordDoubleString

    java.lang.Object
      com.bbn.openmap.layer.vpf.CoordDoubleString

All Implemented Interfaces:
  CoordTupleString

public class CoordDoubleString
extends java.lang.Object
implements CoordTupleString

Encapsulate the VPF Double Coordinate String primitive datatype.

Constructor Summary
`CoordDoubleString(int tuplecount, int tuplesize, BinaryFile input)` Construct a CoordDoubleString from a file input

Method Summary
`double[]` `getasDouble(int tuple)` Get a tuple
`double` `getasDouble(int tuple, int val)` Get a value in a tuple
`float[]` `getasFloat(int tuple)` Get a tuple
`float` `getasFloat(int tuple, int val)` Get a value in a tuple
`java.lang.Number` `getPrimitiveType()` Accessor for the underlying primitive type
`double` `getXasDouble(int tuple)` Get the first value of a tuple
`float` `getXasFloat(int tuple)` Get the first value of a tuple
`double` `getYasDouble(int tuple)` Get the second value of a tuple
`float` `getYasFloat(int tuple)` Get the second value of a tuple
`double` `getZasDouble(int tuple)` Get the third value of a tuple
`float` `getZasFloat(int tuple)` Get the third value of a tuple
`int` `maxIndex()` The maximum indexable tuple value
`java.lang.String` `toString()` A pretty formatter for the doublestring

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CoordDoubleString

    public CoordDoubleString(int tuplecount,
                             int tuplesize,
                             BinaryFile input)
                      throws FormatException

  Construct a CoordDoubleString from a file input

Parameters:
  `tuplecount` - the number of tuples to read from the input stream
  `tuplesize` - the number of doubles in the tuple
  `input` - the input stream to read everything from
Throws:
  `FormatException` - if we have IO errors or premature end-of-file

Method Detail

### maxIndex

    public int maxIndex()

  The maximum indexable tuple value

  Specified by:
    `maxIndex` in interface `CoordTupleString`
  Returns:
    the maximum valid tuple index

### getPrimitiveType

    public java.lang.Number getPrimitiveType()

  Accessor for the underlying primitive type

  Specified by:
    `getPrimitiveType` in interface `CoordTupleString`
  Returns:
    a Double, since that's what we manage

### toString

    public java.lang.String toString()

  A pretty formatter for the doublestring

  Returns:
    a pretty string of the tuple

### getXasFloat

    public float getXasFloat(int tuple)

  Get the first value of a tuple

  Parameters:
    `tuple` - the index of the tuple
  Returns:
    the first value of the tuple given by `tuple`

### getXasDouble

    public double getXasDouble(int tuple)

  Get the first value of a tuple

  Parameters:
    `tuple` - the index of the tuple
  Returns:
    the first value of the tuple given by `tuple`

### getYasFloat

    public float getYasFloat(int tuple)

  Get the second value of a tuple

  Parameters:
    `tuple` - the index of the tuple
  Returns:
    the second value of the tuple given by `tuple`

### getYasDouble

    public double getYasDouble(int tuple)

  Get the second value of a tuple

  Parameters:
    `tuple` - the index of the tuple
  Returns:
    the second value of the tuple given by `tuple`

### getZasFloat

    public float getZasFloat(int tuple)

  Get the third value of a tuple

  Parameters:
    `tuple` - the index of the tuple
  Returns:
    the third value of the tuple given by `tuple`

### getZasDouble

    public double getZasDouble(int tuple)

  Get the third value of a tuple

  Parameters:
    `tuple` - the index of the tuple
  Returns:
    the third value of the tuple given by `tuple`

### getasFloat

    public float[] getasFloat(int tuple)

  Get a tuple

  Specified by:
    `getasFloat` in interface `CoordTupleString`
  Parameters:
    `tuple` - the index of the tuple
  Returns:
    the tuple given by `tuple`

### getasDouble

    public double[] getasDouble(int tuple)

  Get a tuple

  Specified by:
    `getasDouble` in interface `CoordTupleString`
  Parameters:
    `tuple` - the index of the tuple
  Returns:
    the tuple given by `tuple`

### getasFloat

    public float getasFloat(int tuple,
                            int val)

  Get a value in a tuple

  Specified by:
    `getasFloat` in interface `CoordTupleString`
  Parameters:
    `tuple` - the index of the tuple
    `val` - the index of the value
  Returns:
    the tuple given by `tuple`

### getasDouble

    public double getasDouble(int tuple,
                              int val)

  Get a value in a tuple

  Specified by:
    `getasDouble` in interface `CoordTupleString`
  Parameters:
    `tuple` - the index of the tuple
    `val` - the index of the value
  Returns:
    the tuple given by `tuple`

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details