Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rsmckinney committed May 30, 2024
1 parent 6d0c451 commit 25a6a3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion manifold-deps-parent/manifold-ext/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ parameter type nor the return type of the method match the interface. After care
it is clear the methods are call-compatible from the perspective of `Capitalizer`:

```java
Capitalizer cap = (Capitalizer) new MyCapitalizer();
Capitalizer cap = new MyCapitalizer();
CharSequence properName = cap.capitalize("tigers");
```

Expand Down
8 changes: 3 additions & 5 deletions manifold-deps-parent/manifold-json/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,15 @@ Alternatively, you can use the `copier()` static method for a richer set of feat
```java
User copy = User.copier(user).withName("Bob").copy();
```
`copier()` is a lot like `builder()` but lets you start with an already built object you can modify. Also like
`builder()` it maintains the integrity of the schema's declared mutability -- you can't change
`readOnly` fields after the `copy()` method constructs the object.
`copier()` is a lot like `builder()` but initializes your object with state from an already built object. Also like
`builder()` it maintains the integrity of the schema's declared mutability.
## Properties Marked `readOnly` or `writeOnly`
If a property is set to `readOnly` in a schema you can initialize it as a parameter in the `create()` and `builder()`
methods. A `readOnly` property does not have a corresponding setter method in the API, thus you can't modify it after a
type is initialized.
Conversely, a `writeOnly` property such as a password is only writable -- you cannot read such a property using a `get`
method.
Conversely, a `writeOnly` property such as a password is only writable, you cannot access the property's value.
## Nullable Properties
Manifold supports JSON Schema's many curious ways to say that a property can have a `null` value. These include:
Expand Down

0 comments on commit 25a6a3f

Please sign in to comment.