## org.apache.mahout.cf.taste.hadoop
Class EntityPrefWritable

    java.lang.Object
      org.apache.mahout.math.VarLongWritable
          org.apache.mahout.cf.taste.hadoop.EntityPrefWritable

All Implemented Interfaces:
  Cloneable, Comparable<VarLongWritable>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<VarLongWritable>

    public final class EntityPrefWritable

extends VarLongWritable
implements Cloneable

A `Writable` encapsulating an item ID and a preference value.

Constructor Summary
`EntityPrefWritable()`
`EntityPrefWritable(EntityPrefWritable other)`
`EntityPrefWritable(long itemID, float prefValue)`

Method Summary
`EntityPrefWritable` `clone()`
`boolean` `equals(Object o)`
`long` `getID()`
`float` `getPrefValue()`
`int` `hashCode()`
`void` `readFields(DataInput in)`
`String` `toString()`
`void` `write(DataOutput out)`

Methods inherited from class org.apache.mahout.math.VarLongWritable
`compareTo, get, set`

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

Constructor Detail

### EntityPrefWritable

    public EntityPrefWritable()

### EntityPrefWritable

    public EntityPrefWritable(long itemID,
                              float prefValue)

### EntityPrefWritable

    public EntityPrefWritable(EntityPrefWritable other)

Method Detail

### getID

    public long getID()

### getPrefValue

    public float getPrefValue()

### write

    public void write(DataOutput out)
               throws IOException

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

### readFields

    public void readFields(DataInput in)
                    throws IOException

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

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `VarLongWritable`

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `VarLongWritable`

### toString

    public String toString()

  Overrides:
    `toString` in class `VarLongWritable`

### clone

    public EntityPrefWritable clone()

  Overrides:
    `clone` in class `Object`

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