Skip to content

YuriiJavaDev/JavaBasics_Task_366_V0.1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User Data Processing: Standard Consumers (JavaBasics_Task_366_V0.1)

📖 Description

Consistency in data storage often requires pre-processing of user inputs. This project demonstrates the application of the Consumer<T> functional interface. Unlike other functional interfaces, a Consumer is designed to perform an operation on a given argument without returning a result (side-effect only). We implement a text handler that accepts a string, normalizes it by converting it to uppercase, and outputs it to the console. This pattern is widely used in stream processing and reactive programming to handle data elements.

📋 Requirements Compliance

  • Standard Tooling: Employed java.util.function.Consumer<String> to handle text data.
  • Side-Effect Logic: Implemented a lambda expression s -> ... that performs an action (printing) instead of returning a value.
  • Data Normalization: Ensured all processed strings are consistently converted to uppercase using .toUpperCase().
  • Functional Verification: Tested the handler with lowercase input to verify the transformation process.

🚀 Architectural Stack

  • Java 8+ (Standard Functional Interfaces, Generics, Consumer)

🏗️ Implementation Details

  • Consumer: The standard interface for operations that consume a single input.
  • ProcessorLauncherApp: The entry point that defines and executes the data processing logic.

📋 Expected result

JAVA

💻 Code Example

Project Structure:

JavaBasics_Task_366/
├── src/
│   └── com/yurii/pavlenko/
│                 └── app/
│                     └── ProcessorLauncherApp.java
├── LICENSE
├── TASK.md
├── THEORY.md
└── README.md

Code

package com.yurii.pavlenko.app;

import java.util.function.Consumer;

public class ProcessorLauncherApp {

    public static void main(String[] args) {

        Consumer<String> textHandler = s -> System.out.println(s.toUpperCase());

        textHandler.accept("java");
    }
}

⚖️ License

This project is licensed under the MIT License.

Copyright (c) 2026 Yurii Pavlenko

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files...

License: MIT

About

This is a tutorial project. JavaBasics_Task_366_V0.1 User Data Processing: utilizing the standard Consumer functional interface to normalize text input via uppercase conversion. 290426_1018

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages