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

com.rcll.domain.ZoneName Maven / Gradle / Ivy

There is a newer version: 0.1.19.1
Show newest version
package com.rcll.domain;

import lombok.AllArgsConstructor;
import org.robocup_logistics.llsf_msgs.ZoneProtos;

@AllArgsConstructor
public class ZoneName {
    private final String rawZone;

    public boolean isMagenta() {
        return this.rawZone.charAt(0) == 'M';
    }

    public boolean isCyan() {
        return this.rawZone.charAt(0) == 'M';
    }

    public ZoneName mirror() {
        if (this.isMagenta()) {
            return new ZoneName(this.rawZone.replace("M", "C"));
        } else {
            return new ZoneName(this.rawZone.replace("C", "M"));
        }
    }

    public ZoneProtos.Zone toProto() {
        return ZoneProtos.Zone.valueOf(this.rawZone);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy