All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.mowedgrass.jasyptgradleboot.task.file.metadata.FileMetadata.groovy Maven / Gradle / Ivy

package com.github.mowedgrass.jasyptgradleboot.task.file.metadata

import com.github.mowedgrass.jasyptgradleboot.task.file.process.definition.ProcessType

import java.util.function.BiConsumer

class FileMetadata {

    private final Map propertyMap = [:]

    public void addLine(Integer lineNo, PropertyMetadata metadata) {
        propertyMap.put(lineNo, metadata)
    }

    public PropertyMetadata getLine(int lineNo) {
        propertyMap.get(lineNo)
    }

    public Set> lines() {
        propertyMap.entrySet()
    }

    public eachLine(BiConsumer action) {
        propertyMap.forEach(action)
    }

    public boolean contains(ProcessType type) {
        propertyMap.any { lineNo, propertyPreview -> propertyPreview.type == type }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy