StyleBuilder extends AbstractStyleBuilder<Style> { public Style build() { if (unset) { return null; } Style s; if (fts.size() == 0) { s = sf.createNamedStyle(); s.setName(name); } else { s = sf.createStyle(); s.setName(name); if (styleAbstract != null) s.getDescription().setAbstract(new SimpleInternationalString(styleAbstract)); if (title != null) s.getDescription().setTitle(new SimpleInternationalString(title)); for (FeatureTypeStyleBuilder builder : fts) { s.featureTypeStyles().add(builder.build()); } s.setDefault(isDefault); } reset(); return s; } StyleBuilder();   StyleBuilder(AbstractSLDBuilder<?> parent); StyleBuilder name(String name); StyleBuilder title(String title); StyleBuilder styleAbstract(String styleAbstract); FeatureTypeStyleBuilder featureTypeStyle(); Style build(); StyleBuilder unset(); StyleBuilder reset(); StyleBuilder reset(Style style); @Override Style buildStyle();  }
@Test public void anchorPoint() { AnchorPointBuilder b = new AnchorPointBuilder(); AnchorPoint anchor = b.build(); assertEquals(0.0, anchor.getAnchorPointX().evaluate(null, Double.class), 0.0); assertEquals(0.0, anchor.getAnchorPointY().evaluate(null, Double.class), 0.0); anchor = b.x(0.5).y(0.9).build(); assertEquals(0.5, anchor.getAnchorPointX().evaluate(null, Double.class), 0.0); assertEquals(0.9, anchor.getAnchorPointY().evaluate(null, Double.class), 0.0); }
@Test public void fill() throws Exception { FillBuilder b = new FillBuilder(); Fill fill = b.color(Color.BLUE).opacity(0.75).build(); assertNotNull(fill); assertNotNull(b.color); assertEquals(Color.BLUE, fill.getColor().evaluate(null, Color.class)); }
@Test public void halo() { HaloBuilder b = new HaloBuilder(null); Halo halo = b.build(); assertNotNull(halo); }