{"id":43547727,"url":"https://github.com/fillmore-labs/value-comparison","last_synced_at":"2026-02-03T19:07:46.586Z","repository":{"id":41303290,"uuid":"421579535","full_name":"fillmore-labs/value-comparison","owner":"fillmore-labs","description":"Comparison of value objects in Java","archived":false,"fork":false,"pushed_at":"2026-01-30T00:44:18.000Z","size":469,"stargazers_count":2,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-30T14:41:53.685Z","etag":null,"topics":["autovalue","bazel","builder-pattern","code-generation","domain-driven-design","freebuilder","immutables","java","java-records","java17","lombok","scala","value-object","value-semantics"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fillmore-labs.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.adoc","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-10-26T20:47:47.000Z","updated_at":"2025-04-30T23:26:42.000Z","dependencies_parsed_at":"2024-01-19T01:42:42.826Z","dependency_job_id":"eeb6550a-cc61-4519-b296-8f146dfe36da","html_url":"https://github.com/fillmore-labs/value-comparison","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fillmore-labs/value-comparison","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fillmore-labs%2Fvalue-comparison","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fillmore-labs%2Fvalue-comparison/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fillmore-labs%2Fvalue-comparison/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fillmore-labs%2Fvalue-comparison/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fillmore-labs","download_url":"https://codeload.github.com/fillmore-labs/value-comparison/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fillmore-labs%2Fvalue-comparison/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29054108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:43:47.601Z","status":"ssl_error","status_checked_at":"2026-02-03T15:43:46.709Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autovalue","bazel","builder-pattern","code-generation","domain-driven-design","freebuilder","immutables","java","java-records","java17","lombok","scala","value-object","value-semantics"],"created_at":"2026-02-03T19:07:45.794Z","updated_at":"2026-02-03T19:07:46.577Z","avatar_url":"https://github.com/fillmore-labs.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Value Objects in Java\n:Author:    Oliver Eikemeier\n:Email:     \u003ceikemeier@fillmore-labs.com\u003e\n:Date:      2021-12\n:Revision:  v0.1.1\n:toc: macro\nifdef::env-github[]\n:note-caption: :information_source:\n:tip-caption: :bulb:\nendif::[]\n\nimage:https://badge.buildkite.com/13a9640ff1e11890cfcfc26bde3dcc40ffd6617f062e67a35e.svg?branch=main[title=\"Buildkite build status\",link=https://buildkite.com/fillmore-labs/value-objects-in-java]\nimage:https://codecov.io/gh/fillmore-labs/value-comparison/branch/main/graph/badge.svg?token=4KRPCM9FRT[title=\"Codecov test coverage\",link=https://codecov.io/gh/fillmore-labs/value-comparison]\nimage:https://api.codeclimate.com/v1/badges/d2d37684cb129ef18713/maintainability[title=\"Code Climate maintainability\",link=https://codeclimate.com/github/fillmore-labs/value-comparison/maintainability]\n\nDemo code about value objects and how to create them in Java.\n\ntoc::[]\n\n== Purpose\n\nThis source demonstrates how to create value objects in Java using various annotation processors.\n\n== Evaluated Libraries\n\n- https://github.com/google/auto/blob/main/value/userguide/index.md[AutoValue]\n- https://freebuilder.inferred.org[FreeBuilder]\n- https://immutables.github.io[Immutables]\n- https://projectlombok.org[Project Lombok]\n\nAlso, simple https://docs.oracle.com/en/java/javase/17/language/records.html[record classes],\nhttps://docs.scala-lang.org/tour/case-classes.html[Scala case class] amd\nhttps://kotlinlang.org/docs/data-classes.html[Kotlin data class] examples are included for\ndemonstration purposes.\n\n== Structure\n\nIn `+com.fillmore_labs.talk.value.simple.*+` we have simple classes, one `+EmailAddress+` which\ndemonstrates the power of being able to check value objects for consistency during construction and\n`+Person+`, which show how different libraries handle optional parameters and documentation\npropagation.\n\n`+com.fillmore_labs.talk.value.inheritance.*+` and `+com.fillmore_labs.talk.value.composition.*+` demonstrates\nthe https://en.wikipedia.org/wiki/Composition_over_inheritance[composition over inheritance]\nprinciple and why value objects can not meaningfully extend each other.\n\n== Running\n\n=== Prerequisites\n\nYou need https://github.com/bazelbuild/bazelisk[Bazelisk] installed, see also\nhttps://docs.bazel.build/versions/main/install-bazelisk.html[Installing Bazel using Bazelisk].\n\n==== macOS\n\nUsing https://brew.sh[HomeBrew] enter\n\n[source,shell]\nbrew install bazelisk\n\n==== Windows\n\nUsing https://chocolatey.org[Chocolatey] enter\n\n[source,shell]\nchoco install bazelisk\n\nEnable developer mode:\n\n. Open Windows settings\n. Go to “Update \u0026 security”, then “For developers”\n. Under “Developer Mode” section enable “Install apps from any source, including loose files”.\n\nor run with administrator privileges.\n\n=== Main App\n\nThe main app simply demonstrates the `toString()` method with a simple structure.\nRun it with\n\n[source,shell]\n----\nbazelisk run //:value-comparison\n----\n\n=== Tests\n\nTo run all tests, use\n\n[source,shell]\n----\nbazelisk test //src/test/...\n----\n\n[bibliography]\n== References\n\n* Joshua Bloch.\nhttps://www.pearson.com/us/higher-education/program/Bloch-Effective-Java-3rd-Edition/PGM1763855.html[Effective Java, 3rd Edition].\nAddison-Wesley Professional. 2018.\n\n* Martin Odersky, Lex Spoon, Bill Venners. https://www.artima.com/lejava/articles/equality.html[How to Write an Equality Method in Java]. 2009\n\n* Dan Bergh Johnsson.\nhttps://www.infoq.com/presentations/Value-Objects-Dan-Bergh-Johnsson/[Power of Value - Power Use of\nValue Objects in Domain Driven Design]. QCon London. 2009.\n\n* Brian Goetz. https://cr.openjdk.java.net/~briangoetz/amber/datum.html[Data Classes and Sealed Types for Java]. 2019.\n\n* JEP 395. https://openjdk.java.net/jeps/395[Records]. 2020.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffillmore-labs%2Fvalue-comparison","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffillmore-labs%2Fvalue-comparison","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffillmore-labs%2Fvalue-comparison/lists"}