title: What to call factory-like (java) methods used with immutable objects
body: <p>When creating classes for "immutable objects" immutable meaning that state of instances can not be changed; all fields assigned in constructor) in Java (and similar languages), it is sometimes useful to still allow creation of modified instances. That is, using an instance as base, and creating a new instance that differs by just one property value; other values coming from the base instance. To give a simple example, one could have class like:</p>
  
  <pre><code>public class Circle {
    final double x, y; // location
    final double radius;
  
    public Circle(double x, double y, double r) {
      this.x = x;
      this.y = y;
      this.r = r;
    }
  
    // method for creating a new instance, moved in x-axis by specified amount
    public Circle withOffset(double deltaX) {
      return new Circle(x+deltaX, y, radius);
    }
  }
  </code></pre>
  
  <p>So: what should method "withOffset" be called? (note: NOT what its name ought to be -- but what is this class of methods called).
  Technically it is kind of a factory method, but somehow that does not seem quite right to me, since often factories are just given basic properties (and are either static methods, or are not members of the result type but factory type).</p>
  
  <p>So I am guessing there should be a better term for such methods. Since these methods can be used to implement "<a href="http://en.wikipedia.org/wiki/Fluent_interface" rel="nofollow noreferrer">fluent interface</a>", maybe they could be "fluent factory methods"?
  Better suggestions?</p>
  
  <p>EDIT: as suggested by one of answers, <code>java.math.BigDecimal</code> is a good example with its 'add', 'subtract' (etc) methods.</p>
  
  <p>Also: I noticed that there's <a href="https://stackoverflow.com/questions/521893/whats-the-best-name-for-a-non-mutating-add-method-on-an-immutable-collection">this question</a> (by Jon Skeet no less) that is sort of related (although it asks about specific name for method)</p>
  
  <p>EDIT, MAY-2014: My current favorite is <code>mutant factory</code>, FWIW.</p>