io.etcd.jetcd.op

## Class CmpTarget<T>

- java.lang.Object
- - io.etcd.jetcd.op.CmpTarget<T>

Direct Known Subclasses:
  CmpTarget.CreateRevisionCmpTarget, CmpTarget.ModRevisionCmpTarget, CmpTarget.ValueCmpTarget, CmpTarget.VersionCmpTarget

    public abstract class CmpTarget<T>
    extends Object

Cmp target used in `Txn`.

### Nested Class Summary

Nested Classes
`static class` `CmpTarget.CreateRevisionCmpTarget`
`static class` `CmpTarget.ModRevisionCmpTarget`
`static class` `CmpTarget.ValueCmpTarget`
`static class` `CmpTarget.VersionCmpTarget`

### Constructor Summary

Constructors
`protected` `CmpTarget(Compare.CompareTarget target, T targetValue)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static CmpTarget.CreateRevisionCmpTarget` `createRevision(long revision)` Cmp on the create revision.
`Compare.CompareTarget` `getTarget()` Get the compare target used for this compare.
`T` `getTargetValue()` Get the compare target value of this compare.
`static CmpTarget.ModRevisionCmpTarget` `modRevision(long revision)` Cmp on the modification revision.
`static CmpTarget.ValueCmpTarget` `value(ByteSequence value)` Cmp on the value.
`static CmpTarget.VersionCmpTarget` `version(long version)` Cmp on a given version.

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CmpTarget

    protected CmpTarget(Compare.CompareTarget target,
                        T targetValue)

### Method Detail

#### version

    public static CmpTarget.VersionCmpTarget version(long version)

Cmp on a given version.

Parameters:
  `version` - version to compare
Returns:
  the version compare target

#### createRevision

    public static CmpTarget.CreateRevisionCmpTarget createRevision(long revision)

Cmp on the create revision.

Parameters:
  `revision` - the create revision
Returns:
  the create revision compare target

#### modRevision

    public static CmpTarget.ModRevisionCmpTarget modRevision(long revision)

Cmp on the modification revision.

Parameters:
  `revision` - the modification revision
Returns:
  the modification revision compare target

#### value

    public static CmpTarget.ValueCmpTarget value(ByteSequence value)

Cmp on the value.

Parameters:
  `value` - the value to compare
Returns:
  the value compare target

#### getTarget

    public Compare.CompareTarget getTarget()

Get the compare target used for this compare.

Returns:
  the compare target used for this compare

#### getTargetValue

    public T getTargetValue()

Get the compare target value of this compare.

Returns:
  the compare target value of this compare.