# Class Vote

java.lang.Object
org.apache.zookeeper.server.quorum.Vote

public class Vote extends Object

## Constructor Summary

Constructors
Constructor
Description
`Vote(int version, long id, long zxid, long electionEpoch, long peerEpoch, QuorumPeer.ServerState state)`
`Vote(long id, long zxid)`
`Vote(long id, long zxid, long peerEpoch)`
`Vote(long id, long zxid, long electionEpoch, long peerEpoch)`
`Vote(long id, long zxid, long electionEpoch, long peerEpoch, QuorumPeer.ServerState state)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`long`
`getElectionEpoch()`
`long`
`getId()`
`long`
`getPeerEpoch()`
`QuorumPeer.ServerState`
`getState()`
`int`
`getVersion()`
`long`
`getZxid()`
`int`
`hashCode()`
`String`
`toString()`

### Methods inherited from class Object

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

## Constructor Details

### Vote

public Vote(long id, long zxid)

### Vote

public Vote(long id, long zxid, long peerEpoch)

### Vote

public Vote(long id, long zxid, long electionEpoch, long peerEpoch)

### Vote

public Vote(int version, long id, long zxid, long electionEpoch, long peerEpoch, QuorumPeer.ServerState state)

### Vote

public Vote(long id, long zxid, long electionEpoch, long peerEpoch, QuorumPeer.ServerState state)

## Method Details

### getVersion

public int getVersion()

### getId

public long getId()

### getZxid

public long getZxid()

### getElectionEpoch

public long getElectionEpoch()

### getPeerEpoch

public long getPeerEpoch()

### getState

public QuorumPeer.ServerState getState()

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`