Skip to content

Commit

Permalink
GH-100 - Polishing.
Browse files Browse the repository at this point in the history
Added missing license header. Simplify SimpleAssociation.equals(…).
  • Loading branch information
odrotbohm committed Aug 17, 2023
1 parent e839c3c commit c5324d9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ class SimpleAssociation<T : AggregateRoot<T, ID>, ID : Identifier>(private val i

other as SimpleAssociation<*, *>

if (id != other.id) return false

return true
return id == other.id
}

override fun hashCode(): Int = id.hashCode()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
/*
* Copyright 2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jmolecules.ddd.types

/**
* Identifies a value object. Domain concepts that are modeled as value objects have no conceptual identity or
* lifecycle. Implementations should be immutable, operations on it are side-effect free.
* Identifies a value object. Domain concepts that are modeled as value objects have no conceptual identity or lifecycle.
* Implementations should be immutable, operations on it are side-effect free.
*
* Kotlin's counterpart of Java's [ValueObject](https://github.com/xmolecules/jmolecules/blob/main/jmolecules-ddd/src/main/java/org/jmolecules/ddd/types/ValueObject.java)
*
Expand Down

0 comments on commit c5324d9

Please sign in to comment.