com.basho.riak.client.cap
Class ClobberMutation<T>

java.lang.Object
  extended by com.basho.riak.client.cap.ClobberMutation<T>
Type Parameters:
T - the type of the value
All Implemented Interfaces:
Mutation<T>

public class ClobberMutation<T>
extends Object
implements Mutation<T>

A mutation that overwrites the original value with a new one.

Author:
russell

Constructor Summary
ClobberMutation(T newValue)
          Create a clobber mutation that will return newValue from apply(T)
 
Method Summary
 T apply(T original)
          Applies a mutation to the original value passed in
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClobberMutation

public ClobberMutation(T newValue)
Create a clobber mutation that will return newValue from apply(T)

Parameters:
newValue -
Method Detail

apply

public T apply(T original)
Description copied from interface: Mutation
Applies a mutation to the original value passed in

Specified by:
apply in interface Mutation<T>
Parameters:
original - the value to mutate.
Returns:
simply returns whatever the argument to the constructor was.


Copyright © 2012. All Rights Reserved.