package org.skyscreamer.yoga.selector;

import java.util.Set;

public abstract class AbstractSelectable implements Selectable
{
    private Set<SelectorField> _selectorFields;

    public AbstractSelectable( Selector selector )
    {
        _selectorFields = selector.getFields();
    }

    public Set<SelectorField> getSelectorFields()
    {
        return _selectorFields;
    }
}


@@ -33,16 +33,46 @@
 ector;%0A%0A
+import java.util.Collections;%0A
 import j
@@ -85,16 +85,16 @@
 il.Set;%0A
-
 %0Apublic 
@@ -200,16 +200,52 @@
 ields;%0A%0A
+    public AbstractSelectable() %7B%7D%0A%0A
     publ
@@ -305,25 +305,20 @@
     
-_
 s
+etS
 elector
-Fields =
+(
  sel
@@ -326,19 +326,9 @@
 ctor
-.getFields(
+ 
 );%0A 
@@ -427,11 +427,175 @@
 ;%0A    %7D%0A
-%7D
 %0A
+    public void setSelector( Selector selector ) %7B%0A        _selectorFields = selector != null ? selector.getFields() : Collections.%3CSelectorField%3EemptySet();%0A    %7D%0A%7D
 %0A

Allow selector to be set after construction