refactoring: Issue #2377: The repository code has been refactored to use the recor… (#2505)

* Issue #2377: The repository code has been refactored to use the record class

* Issue #2377: Refactored according to the rules defined for the repo code

* Issue #2377: Refactored according to the rules defined for the repo code

* Issue #2377: Refactored according to the rules defined for the repo code
This commit is contained in:
Mughees Qasim authored and GitHub committed 2023-05-06 12:08:12 +03:00
1 parent c0e1603f90
commit 3ae6b07590
26 files changed
+244 -293

No files matched your search

@@ -25,48 +25,13 @@
package com.iluwatar.builder; package com.iluwatar.builder;
/** /**
* Hero, the class with many parameters. * Hero,the record class.
*/ */
public final class Hero {
private final Profession profession; public record Hero(Profession profession, String name, HairType hairType, HairColor hairColor, Armor armor, Weapon weapon) {
private final String name;
private final HairType hairType;
private final HairColor hairColor;
private final Armor armor;
private final Weapon weapon;
private Hero(Builder builder) { private Hero(Builder builder) {
this.profession = builder.profession; this(builder.profession, builder.name, builder.hairType, builder.hairColor, builder.armor, builder.weapon);
this.name = builder.name;
this.hairColor = builder.hairColor;
this.hairType = builder.hairType;
this.weapon = builder.weapon;
this.armor = builder.armor;
}
public Profession getProfession() {
return profession;
}
public String getName() {
return name;
}
public HairType getHairType() {
return hairType;
}
public HairColor getHairColor() {
return hairColor;
}
public Armor getArmor() {
return armor;
}
public Weapon getWeapon() {
return weapon;
} }
@Override @Override
@@ -69,12 +69,12 @@ class HeroTest {
assertNotNull(hero); assertNotNull(hero);
assertNotNull(hero.toString()); assertNotNull(hero.toString());
assertEquals(Profession.WARRIOR, hero.getProfession()); assertEquals(Profession.WARRIOR, hero.profession());
assertEquals(heroName, hero.getName()); assertEquals(heroName, hero.name());
assertEquals(Armor.CHAIN_MAIL, hero.getArmor()); assertEquals(Armor.CHAIN_MAIL, hero.armor());
assertEquals(Weapon.SWORD, hero.getWeapon()); assertEquals(Weapon.SWORD, hero.weapon());
assertEquals(HairType.LONG_CURLY, hero.getHairType()); assertEquals(HairType.LONG_CURLY, hero.hairType());
assertEquals(HairColor.BLOND, hero.getHairColor()); assertEquals(HairColor.BLOND, hero.hairColor());
} }
@@ -1,5 +1,5 @@
/* /*
* This project is licensed under the MIT license. Module intercepting-filter is using ZK framework licensed under LGPL (see lgpl-3.0.txt). * This project is licensed under the MIT license. Module model-view-viewmodel is using ZK framework licensed under LGPL (see lgpl-3.0.txt).
* *
* The MIT License * The MIT License
* Copyright © 2014-2022 Ilkka Seppälä * Copyright © 2014-2022 Ilkka Seppälä
@@ -1,5 +1,5 @@
/* /*
* This project is licensed under the MIT license. Module model-view-presenter is using ZK framework licensed under LGPL (see lgpl-3.0.txt). * This project is licensed under the MIT license. Module model-view-viewmodel is using ZK framework licensed under LGPL (see lgpl-3.0.txt).
* *
* The MIT License * The MIT License
* Copyright © 2014-2022 Ilkka Seppälä * Copyright © 2014-2022 Ilkka Seppälä
@@ -54,10 +54,10 @@ public class App {
*/ */
public static void main(String[] args) { public static void main(String[] args) {
var user = new User("user", 24, Sex.FEMALE, "foobar.com"); var user = new User("user", 24, Sex.FEMALE, "foobar.com");
LOGGER.info(Validator.of(user).validate(User::getName, Objects::nonNull, "name is null") LOGGER.info(Validator.of(user).validate(User::name, Objects::nonNull, "name is null")
.validate(User::getName, name -> !name.isEmpty(), "name is empty") .validate(User::name, name -> !name.isEmpty(), "name is empty")
.validate(User::getEmail, email -> !email.contains("@"), "email doesn't contains '@'") .validate(User::email, email -> !email.contains("@"), "email doesn't contains '@'")
.validate(User::getAge, age -> age > 20 && age < 30, "age isn't between...").get() .validate(User::age, age -> age > 20 && age < 30, "age isn't between...").get()
.toString()); .toString());
} }
} }
@@ -25,43 +25,13 @@
package com.iluwatar.monad; package com.iluwatar.monad;
/** /**
* User Definition. * Record class.
*
* @param name - name
* @param age - age
* @param sex - sex
* @param email - email address
*/ */
public class User { public record User(String name, int age, Sex sex, String email) {
private final String name;
private final int age;
private final Sex sex;
private final String email;
/**
* Constructor.
*
* @param name - name
* @param age - age
* @param sex - sex
* @param email - email address
*/
public User(String name, int age, Sex sex, String email) {
this.name = name;
this.age = age;
this.sex = sex;
this.email = email;
}
public String getName() {
return name;
}
public int getAge() {
return age;
}
public Sex getSex() {
return sex;
}
public String getEmail() {
return email;
}
} }
@@ -41,7 +41,7 @@ class MonadTest {
assertThrows( assertThrows(
IllegalStateException.class, IllegalStateException.class,
() -> Validator.of(tom) () -> Validator.of(tom)
.validate(User::getName, Objects::nonNull, "name cannot be null") .validate(User::name, Objects::nonNull, "name cannot be null")
.get() .get()
); );
} }
@@ -52,8 +52,8 @@ class MonadTest {
assertThrows( assertThrows(
IllegalStateException.class, IllegalStateException.class,
() -> Validator.of(john) () -> Validator.of(john)
.validate(User::getName, Objects::nonNull, "name cannot be null") .validate(User::name, Objects::nonNull, "name cannot be null")
.validate(User::getAge, age -> age > 21, "user is underage") .validate(User::age, age -> age > 21, "user is underage")
.get() .get()
); );
} }
@@ -62,10 +62,10 @@ class MonadTest {
void testForValid() { void testForValid() {
var sarah = new User("Sarah", 42, Sex.FEMALE, "sarah@det.org"); var sarah = new User("Sarah", 42, Sex.FEMALE, "sarah@det.org");
var validated = Validator.of(sarah) var validated = Validator.of(sarah)
.validate(User::getName, Objects::nonNull, "name cannot be null") .validate(User::name, Objects::nonNull, "name cannot be null")
.validate(User::getAge, age -> age > 21, "user is underage") .validate(User::age, age -> age > 21, "user is underage")
.validate(User::getSex, sex -> sex == Sex.FEMALE, "user is not female") .validate(User::sex, sex -> sex == Sex.FEMALE, "user is not female")
.validate(User::getEmail, email -> email.contains("@"), "email does not contain @ sign") .validate(User::email, email -> email.contains("@"), "email does not contain @ sign")
.get(); .get();
assertSame(validated, sarah); assertSame(validated, sarah);
} }
@@ -29,27 +29,9 @@ import lombok.extern.slf4j.Slf4j;
/** /**
* Implementation for binary tree's normal nodes. * Implementation for binary tree's normal nodes.
*/ */
@Slf4j @Slf4j
public class NodeImpl implements Node { public record NodeImpl(String name, Node left, Node right) implements Node {
private final String name;
private final Node left;
private final Node right;
/**
* Constructor.
*/
public NodeImpl(String name, Node left, Node right) {
this.name = name;
this.left = left;
this.right = right;
}
@Override
public int getTreeSize() {
return 1 + left.getTreeSize() + right.getTreeSize();
}
@Override @Override
public Node getLeft() { public Node getLeft() {
return left; return left;
@@ -64,7 +46,10 @@ public class NodeImpl implements Node {
public String getName() { public String getName() {
return name; return name;
} }
@Override
public int getTreeSize() {
return 1 + left.getTreeSize() + right.getTreeSize();
}
@Override @Override
public void walk() { public void walk() {
LOGGER.info(name); LOGGER.info(name);
@@ -26,34 +26,10 @@ package com.iluwatar.partialresponse;
/** /**
* {@link Video} is a entity to serve from server.It contains all video related information. * {@link Video} is a entity to serve from server.It contains all video related information.
* Video is a record class.
*/ */
public class Video {
private final Integer id;
private final String title;
private final Integer length;
private final String description;
private final String director;
private final String language;
/**
* Constructor.
*
* @param id video unique id
* @param title video title
* @param len video length in minutes
* @param desc video description by publisher
* @param director video director name
* @param lang video language {private, public}
*/
public Video(Integer id, String title, Integer len, String desc, String director, String lang) {
this.id = id;
this.title = title;
this.length = len;
this.description = desc;
this.director = director;
this.language = lang;
}
public record Video(Integer id, String title, Integer length, String description, String director, String language) {
/** /**
* ToString. * ToString.
* *
@@ -62,12 +38,12 @@ public class Video {
@Override @Override
public String toString() { public String toString() {
return "{" return "{"
+ "\"id\": " + id + "," + "\"id\": " + id + ","
+ "\"title\": \"" + title + "\"," + "\"title\": \"" + title + "\","
+ "\"length\": " + length + "," + "\"length\": " + length + ","
+ "\"description\": \"" + description + "\"," + "\"description\": \"" + description + "\","
+ "\"director\": \"" + director + "\"," + "\"director\": \"" + director + "\","
+ "\"language\": \"" + language + "\"," + "\"language\": \"" + language + "\","
+ "}"; + "}";
} }
} }
@@ -27,24 +27,14 @@ package com.iluwatar.partialresponse;
import java.util.Map; import java.util.Map;
/** /**
* The resource class which serves video information. This class act as server in the demo. Which * The resource record class which serves video information. This class act as server in the demo. Which
* has all video details. * has all video details.
*
* @param fieldJsonMapper map object to json.
* @param videos initialize resource with existing videos. Act as database.
*/ */
public class VideoResource {
private final FieldJsonMapper fieldJsonMapper;
private final Map<Integer, Video> videos;
/**
* Constructor.
*
* @param fieldJsonMapper map object to json.
* @param videos initialize resource with existing videos. Act as database.
*/
public VideoResource(FieldJsonMapper fieldJsonMapper, Map<Integer, Video> videos) {
this.fieldJsonMapper = fieldJsonMapper;
this.videos = videos;
}
public record VideoResource(FieldJsonMapper fieldJsonMapper, Map<Integer, Video> videos) {
/** /**
* Get Details. * Get Details.
* *
@@ -44,6 +44,6 @@ public class ImmutableStew {
public void mix() { public void mix() {
LOGGER LOGGER
.info("Mixing the immutable stew we find: {} potatoes, {} carrots, {} meat and {} peppers", .info("Mixing the immutable stew we find: {} potatoes, {} carrots, {} meat and {} peppers",
data.getNumPotatoes(), data.getNumCarrots(), data.getNumMeat(), data.getNumPeppers()); data.numPotatoes(), data.numCarrots(), data.numMeat(), data.numPeppers());
} }
} }
@@ -27,36 +27,6 @@ package com.iluwatar.privateclassdata;
/** /**
* Stew ingredients. * Stew ingredients.
*/ */
public class StewData {
private final int numPotatoes; public record StewData(int numPotatoes, int numCarrots, int numMeat, int numPeppers) {
private final int numCarrots;
private final int numMeat;
private final int numPeppers;
/**
* Constructor.
*/
public StewData(int numPotatoes, int numCarrots, int numMeat, int numPeppers) {
this.numPotatoes = numPotatoes;
this.numCarrots = numCarrots;
this.numMeat = numMeat;
this.numPeppers = numPeppers;
}
public int getNumPotatoes() {
return numPotatoes;
}
public int getNumCarrots() {
return numCarrots;
}
public int getNumMeat() {
return numMeat;
}
public int getNumPeppers() {
return numPeppers;
}
} }
@@ -47,7 +47,7 @@ public class Consumer {
public void consume() throws InterruptedException { public void consume() throws InterruptedException {
var item = queue.take(); var item = queue.take();
LOGGER.info("Consumer [{}] consume item [{}] produced by [{}]", name, LOGGER.info("Consumer [{}] consume item [{}] produced by [{}]", name,
item.getId(), item.getProducer()); item.id(), item.producer());
} }
} }
@@ -27,25 +27,5 @@ package com.iluwatar.producer.consumer;
/** /**
* Class take part of an {@link Producer}-{@link Consumer} exchange. * Class take part of an {@link Producer}-{@link Consumer} exchange.
*/ */
public class Item { public record Item(String producer, int id) {
private final String producer;
private final int id;
public Item(String producer, int id) {
this.id = id;
this.producer = producer;
}
public int getId() {
return id;
}
public String getProducer() {
return producer;
}
} }
@@ -27,23 +27,7 @@ package com.iluwatar.registry;
/** /**
* Customer entity used in registry pattern example. * Customer entity used in registry pattern example.
*/ */
public class Customer { public record Customer(String id, String name) {
private final String id;
private final String name;
public Customer(String id, String name) {
this.id = id;
this.name = name;
}
public String getId() {
return id;
}
public String getName() {
return name;
}
@Override @Override
public String toString() { public String toString() {
@@ -45,7 +45,7 @@ public final class CustomerRegistry {
} }
public Customer addCustomer(Customer customer) { public Customer addCustomer(Customer customer) {
return customerMap.put(customer.getId(), customer); return customerMap.put(customer.id(), customer);
} }
public Customer getCustomer(String id) { public Customer getCustomer(String id) {
@@ -50,13 +50,13 @@ class CustomerRegistryTest {
Customer customerWithId1 = customerRegistry.getCustomer("1"); Customer customerWithId1 = customerRegistry.getCustomer("1");
assertNotNull(customerWithId1); assertNotNull(customerWithId1);
assertEquals("1", customerWithId1.getId()); assertEquals("1", customerWithId1.id());
assertEquals("john", customerWithId1.getName()); assertEquals("john", customerWithId1.name());
Customer customerWithId2 = customerRegistry.getCustomer("2"); Customer customerWithId2 = customerRegistry.getCustomer("2");
assertNotNull(customerWithId2); assertNotNull(customerWithId2);
assertEquals("2", customerWithId2.getId()); assertEquals("2", customerWithId2.id());
assertEquals("julia", customerWithId2.getName()); assertEquals("julia", customerWithId2.name());
} }
@Test @Test
@@ -37,21 +37,11 @@ import java.util.List;
* *
* @author George Aristy (george.aristy@gmail.com) * @author George Aristy (george.aristy@gmail.com)
*/ */
public final class FindCustomer implements BusinessOperation<String> {
private final String customerId;
private final Deque<BusinessException> errors;
/** public record FindCustomer(String customerId, Deque<BusinessException> errors) implements BusinessOperation<String> {
* Ctor.
*
* @param customerId the final result of the remote operation
* @param errors the errors to throw before returning {@code customerId}
*/
public FindCustomer(String customerId, BusinessException... errors) { public FindCustomer(String customerId, BusinessException... errors) {
this.customerId = customerId; this(customerId, new ArrayDeque<>(List.of(errors)));
this.errors = new ArrayDeque<>(List.of(errors));
} }
@Override @Override
public String perform() throws BusinessException { public String perform() throws BusinessException {
if (!this.errors.isEmpty()) { if (!this.errors.isEmpty()) {
@@ -27,26 +27,15 @@ package com.iluwatar.separatedinterface.invoice;
/** /**
* InvoiceGenerator class generates an invoice, accepting the product cost and calculating the total * InvoiceGenerator class generates an invoice, accepting the product cost and calculating the total
* price payable inclusive tax (calculated by {@link TaxCalculator}). * price payable inclusive tax (calculated by {@link TaxCalculator}).
*
*/ */
public class InvoiceGenerator { public record InvoiceGenerator(double amount, TaxCalculator taxCalculator) {
/** TaxCalculator description:
/**
* The TaxCalculator interface to calculate the payable tax. * The TaxCalculator interface to calculate the payable tax.
*/ * Amount description:
private final TaxCalculator taxCalculator;
/**
* The base product amount without tax. * The base product amount without tax.
*/ */
private final double amount;
public InvoiceGenerator(double amount, TaxCalculator taxCalculator) {
this.amount = amount;
this.taxCalculator = taxCalculator;
}
public double getAmountWithTax() { public double getAmountWithTax() {
return amount + taxCalculator.calculate(amount); return amount + taxCalculator.calculate(amount);
} }
}
}
@@ -1,3 +1,27 @@
/*
* This project is licensed under the MIT license. Module model-view-viewmodel is using ZK framework licensed under LGPL (see lgpl-3.0.txt).
*
* The MIT License
* Copyright © 2014-2022 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.servicetoworker; package com.iluwatar.servicetoworker;
import com.iluwatar.model.view.controller.Fatigue; import com.iluwatar.model.view.controller.Fatigue;
@@ -27,9 +51,9 @@ public class Action {
* @param command the command * @param command the command
*/ */
public void updateModel(Command command) { public void updateModel(Command command) {
setFatigue(command.getFatigue()); setFatigue(command.fatigue());
setHealth(command.getHealth()); setHealth(command.health());
setNourishment(command.getNourishment()); setNourishment(command.nourishment());
} }
/** /**
@@ -1,3 +1,27 @@
/*
* This project is licensed under the MIT license. Module model-view-viewmodel is using ZK framework licensed under LGPL (see lgpl-3.0.txt).
*
* The MIT License
* Copyright © 2014-2022 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.servicetoworker; package com.iluwatar.servicetoworker;
import com.iluwatar.model.view.controller.Fatigue; import com.iluwatar.model.view.controller.Fatigue;
@@ -1,32 +1,40 @@
/*
* This project is licensed under the MIT license. Module model-view-viewmodel is using ZK framework licensed under LGPL (see lgpl-3.0.txt).
*
* The MIT License
* Copyright © 2014-2022 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.servicetoworker; package com.iluwatar.servicetoworker;
import com.iluwatar.model.view.controller.Fatigue; import com.iluwatar.model.view.controller.Fatigue;
import com.iluwatar.model.view.controller.Health; import com.iluwatar.model.view.controller.Health;
import com.iluwatar.model.view.controller.Nourishment; import com.iluwatar.model.view.controller.Nourishment;
import lombok.Getter;
/** /**
* The type Command. * The type Command.
* Instantiates a new Command.
*
* @param fatigue the fatigue
* @param health the health
* @param nourishment the nourishment
*/ */
public class Command { public record Command(Fatigue fatigue, Health health, Nourishment nourishment) {
@Getter
private final Fatigue fatigue;
@Getter
private final Health health;
@Getter
private final Nourishment nourishment;
/**
* Instantiates a new Command.
*
* @param fatigue the fatigue
* @param health the health
* @param nourishment the nourishment
*/
public Command(Fatigue fatigue, Health health, Nourishment nourishment) {
this.fatigue = fatigue;
this.health = health;
this.nourishment = nourishment;
}
} }
@@ -1,3 +1,27 @@
/*
* This project is licensed under the MIT license. Module model-view-viewmodel is using ZK framework licensed under LGPL (see lgpl-3.0.txt).
*
* The MIT License
* Copyright © 2014-2022 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.servicetoworker; package com.iluwatar.servicetoworker;
import java.util.ArrayList; import java.util.ArrayList;
@@ -1,3 +1,27 @@
/*
* This project is licensed under the MIT license. Module model-view-viewmodel is using ZK framework licensed under LGPL (see lgpl-3.0.txt).
*
* The MIT License
* Copyright © 2014-2022 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.servicetoworker; package com.iluwatar.servicetoworker;
import lombok.Getter; import lombok.Getter;
@@ -1,3 +1,27 @@
/*
* This project is licensed under the MIT license. Module model-view-viewmodel is using ZK framework licensed under LGPL (see lgpl-3.0.txt).
*
* The MIT License
* Copyright © 2014-2022 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.servicetoworker; package com.iluwatar.servicetoworker;
import com.iluwatar.model.view.controller.Fatigue; import com.iluwatar.model.view.controller.Fatigue;
@@ -1,3 +1,27 @@
/*
* This project is licensed under the MIT license. Module model-view-viewmodel is using ZK framework licensed under LGPL (see lgpl-3.0.txt).
*
* The MIT License
* Copyright © 2014-2022 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.servicetoworker; package com.iluwatar.servicetoworker;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;