Permalink
Browse files

Merge pull request #597 from hector-client/dynamiccomposite

Updated DynamicComposite to override super's addComponent methods
  • Loading branch information...
zznate committed Mar 14, 2013
2 parents 925908e + e3948c5 commit 3e252797504b1838d96d52068231084efdcabfa1
Showing with 42 additions and 0 deletions.
  1. +42 −0 core/src/main/java/me/prettyprint/hector/api/beans/DynamicComposite.java
@@ -2,6 +2,7 @@
import java.nio.ByteBuffer;
import java.util.List;
import me.prettyprint.hector.api.Serializer;
public class DynamicComposite extends AbstractComposite {
@@ -35,5 +36,46 @@ public static ByteBuffer toByteBuffer(Object... o) {
public static ByteBuffer toByteBuffer(List<?> l) {
DynamicComposite composite = new DynamicComposite(l);
return composite.serialize();
}
@Override
public <T> DynamicComposite addComponent(int index, T element, ComponentEquality equality) {
super.addComponent(index, element, equality);
return this;
}
@Override
public <T> DynamicComposite addComponent(T value, Serializer<T> s) {
super.addComponent(value, s);
return this;
}
@Override
public <T> DynamicComposite addComponent(T value, Serializer<T> s,
String comparator) {
super.addComponent(value, s, comparator);
return this;
}
@Override
public <T> DynamicComposite addComponent(T value, Serializer<T> s,
String comparator, ComponentEquality equality) {
super.addComponent(value, s, comparator, equality);
return this;
}
@Override
public <T> DynamicComposite addComponent(int index, T value,
Serializer<T> s, String comparator, ComponentEquality equality) {
super.addComponent(index, value, s, comparator, equality);
return this;
}
}

0 comments on commit 3e25279

Please sign in to comment.