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

io.contek.zeus.ServerOrderLabel Maven / Gradle / Ivy

The newest version!
package io.contek.zeus;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;

@Immutable
public final class ServerOrderLabel extends StringKey {

  private ServerOrderLabel(String stringValue) {
    super(stringValue);
  }

  public static ServerOrderLabel of(int longValue) {
    return of(Integer.toString(longValue));
  }

  public static ServerOrderLabel of(long longValue) {
    return of(Long.toString(longValue));
  }

  public static ServerOrderLabel of(String stringValue) {
    ServerOrderLabel result = ofNullable(stringValue);
    if (result == null) {
      throw new IllegalArgumentException(stringValue);
    }
    return result;
  }

  @Nullable
  public static ServerOrderLabel ofNullable(@Nullable String stringValue) {
    if (stringValue == null || stringValue.isEmpty()) {
      return null;
    }
    return new ServerOrderLabel(stringValue);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy