## org.apache.mahout.cf.taste.hadoop.item
Class VectorOrPrefWritable

    java.lang.Object
      org.apache.mahout.cf.taste.hadoop.item.VectorOrPrefWritable

All Implemented Interfaces:
  org.apache.hadoop.io.Writable

    public final class VectorOrPrefWritable

extends Object
implements org.apache.hadoop.io.Writable

Constructor Summary
`VectorOrPrefWritable()`
`VectorOrPrefWritable(long userID, float value)`
`VectorOrPrefWritable(Vector vector)`

Method Summary
`long` `getUserID()`
`float` `getValue()`
`Vector` `getVector()`
`void` `readFields(DataInput in)`
`void` `set(long userID, float value)`
`String` `toString()`
`void` `write(DataOutput out)`

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

Constructor Detail

### VectorOrPrefWritable

    public VectorOrPrefWritable()

### VectorOrPrefWritable

    public VectorOrPrefWritable(Vector vector)

### VectorOrPrefWritable

    public VectorOrPrefWritable(long userID,
                                float value)

Method Detail

### getVector

    public Vector getVector()

### getUserID

    public long getUserID()

### getValue

    public float getValue()

### set

    public void set(long userID,
                    float value)

### write

    public void write(DataOutput out)
               throws IOException

  Specified by:
    `write` in interface `org.apache.hadoop.io.Writable`
  Throws:
    `IOException`

### readFields

    public void readFields(DataInput in)
                    throws IOException

  Specified by:
    `readFields` in interface `org.apache.hadoop.io.Writable`
  Throws:
    `IOException`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.