Since Java is always uncurried, we often use constructor arguments to work around it or a factory.
Then, every use of the object has the constructor arguments applied.
Foo foo = new Foo("foo"); foo.method("bar"); // method uses the value "foo" by accessing a field
Consider a trivial example Encoder -> String -> byte[]
.
Encoder e = new Encoder("UTF-8"); byte[] encoded = e.encode(contents); // has UTF-8 applied.