Skip to content

Instantly share code, notes, and snippets.

@niloc132
Created April 30, 2012 18:00
Show Gist options
  • Save niloc132/2560508 to your computer and use it in GitHub Desktop.
Save niloc132/2560508 to your computer and use it in GitHub Desktop.
Package Name Has Cell
public class HasCellImpl<M,V> implements HasCell<M,V>
{
public HasCellImpl(ValueProvider<? super M, V> vp, Cell<V> cell)
{
this.cell = cell;
this.vp = vp;
}
@Override
public Cell<V> getCell()
{
return this.cell;
}
@Override
public FieldUpdater<M, V> getFieldUpdater() { return null; } // not editable, unless it is... then make this return `this` and make the setValue proxy to vp.setValue
@Override
public V getValue(M object)
{
return vp.getValue(object);
}
private final Cell<V> cell;
private final ValueProvider<? super M, V> vp;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment