anchor.diff:  
   TODO: COde example
   
  -
  -
  -
  +[source, java]
  +----
  +public interface Order {
  +
  +    public LocalDateTime at();
  +
  +    public Side getSide();
  +
  +    public int getQuantity();
  +
  +    public BigDecimal getPrice();
  +}
  +----
  +
  +Now let's have a mutable order based on that interface
  +[source, java]
  +----
  +
  +public class MutableOrder implements Order {
  +
  +    private LocalDateTime at;
  +    private Side side;
  +    private BigDecimal price;
  +    private int quantity;
  +
  +    public void setAt(LocalDateTime at) {
  +        this.at = at;
  +    }
  +
  +    public void setSide(Side side) {
  +        this.side = side;
  +    }
  +
  +    public void setPrice(BigDecimal price) {
  +        this.price = price;
  +    }
  +
  +    public void setQuantity(int quantity) {
  +        this.quantity = quantity;
  +    }
  +
  +    @Override
  +    public int getQuantity() {
  +        return quantity;
  +    }
  +
  +    @Override
  +    public BigDecimal getPrice() {
  +        return price;
  +    }
  +
  +    @Override
  +    public LocalDateTime at() {
  +        return at;
  +    }
  +
  +    @Override
  +    public Side getSide() {
  +        return side;
  +    }
  +}
  +
  +----
  +
  +
  +
  +To correct those issues, we can have an immutable object for an order
  +
  +[source,java]
  +----
  +public class ImmutableOrder implements Order {
  +
  +    private final BigDecimal price;
  +    private final int quantity;
  +    private final Side side;
  +    private final LocalDateTime at;
  +
  +    public ImmutableOrder(BigDecimal price, int quantity, Side side, LocalDateTime at) {
  +        this.price = price;
  +        this.quantity = quantity;
  +        this.side = side;
  +        this.at = at;
  +    }
  +    
  +    @Override
  +    public LocalDateTime at() {
  +        return null;
  +    }
  +
  +    @Override
  +    public Side getSide() {
  +        return null;
  +    }
  +    
  +    @Override
  +    public int getQuantity() {
  +        return 0;
  +    }
  +
  +    @Override
  +    public BigDecimal getPrice() {
  +        return null;
  +    }
  +}
  +----
  +
  +
  +This example is trivial in that the number of f
   
   
   ==== We have Immutable Objects But What About Collections?
  
positive.code: :hp-tags: Functional Programming, Immutability, Fluent APIs, Builders, Aneamic objects, Factories, Guava, Functions
  
  
  Complex anaemic object
  
  Long constructor
  
  Construct objects with long constructor or setters which are error prone.  How do I know object is actually fit for purpose. 
  
negative.code: Fortunately there's now a library that can solve thse so
  
  
  [source, xml]
  ----
  <dependency>
  	<groupId>org.immutables</groupId>
  	<artifactId>value</artifactId>
  	<version>2.1.4</version>
  </dependency>
  ----
  
  
  
  