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

au.gov.amsa.sgb.decoder.vesselid.AircraftRegistrationMarking Maven / Gradle / Ivy

package au.gov.amsa.sgb.decoder.vesselid;

import java.util.Optional;

import com.github.davidmoten.guavamini.Preconditions;

public final class AircraftRegistrationMarking implements VesselId {

    // used for serialization
    private final VesselIdType vesselIdType = VesselIdType.AIRCRAFT_REGISTRATION_MARKING;
    private final Optional value;

    public AircraftRegistrationMarking(String value) {
        Preconditions.checkNotNull(value);
        String s = value.trim();
        if (s.isEmpty()) {
            this.value = Optional.empty();
        } else {
            this.value = Optional.of(s);
        }
    }

    @Override
    public VesselIdType vesselIdType() {
        return vesselIdType;
    }

    public Optional value() {
        return value;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy