package com.trinity.sample;

/**
 * Trinity Sample Java File
 * Demonstrates Trinity's text processing capabilities
 */
public class TrinityDemo {
    private String name;
    private String version;
    private int processedCount;
    
    public TrinityDemo(String name, String version) {
        this.name = name;
        this.version = version;
        this.processedCount = 0;
    }
    
    public String greet() {
        return String.format("Hello from %s v%s!", name, version);
    }
    
    public ProcessResult processText(String text) {
        processedCount++;
        return new ProcessResult(
            text.length(),
            true,
            processedCount,
            28.5
        );
    }
    
    public static void main(String[] args) {
        TrinityDemo demo = new TrinityDemo("Trinity", "1.0.0");
        System.out.println(demo.greet());
        
        String sample = "This is a sample text for processing.";
        ProcessResult result = demo.processText(sample);
        System.out.println("Processed: " + result);
    }
}

class ProcessResult {
    int originalLength;
    boolean processed;
    int count;
    double compressionRate;
    
    ProcessResult(int len, boolean proc, int cnt, double rate) {
        this.originalLength = len;
        this.processed = proc;
        this.count = cnt;
        this.compressionRate = rate;
    }
}
