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

com.geotab.model.entity.unitofmeasure.UnitOfMeasureSystem Maven / Gradle / Ivy

/*
 *
 * 2020 Copyright (C) Geotab Inc. All rights reserved.
 */

package com.geotab.model.entity.unitofmeasure;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * Represents a system supported unit of measure which cannot be changed.
 */
@NoArgsConstructor
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class UnitOfMeasureSystem extends UnitOfMeasure {

  private static class InstanceHolder {

    private static final UnitOfMeasureSystem INSTANCE = new UnitOfMeasureSystem();
  }

  protected UnitOfMeasureSystem(String id, String name) {
    super(id, name);
  }

  @JsonIgnore
  @Override
  public boolean isSystemEntity() {
    return true;
  }

  public static UnitOfMeasureSystem getInstance() {
    return UnitOfMeasureSystem.InstanceHolder.INSTANCE;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy