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

com.backendless.hive.DuplicateBehaviour Maven / Gradle / Ivy

The newest version!
package com.backendless.hive;


public enum DuplicateBehaviour
{
  /**
   * Only update elements that already exist. Never add elements.
   */
  OnlyUpdate,
  /**
   * Don't update already existing elements. Always add new elements.
   */
  AlwaysAdd;

  public static DuplicateBehaviour valueOfIgnoreCase( String name )
  {
    if( name == null )
      throw new NullPointerException( "Argument \"name\" is null" );

    String lowCaseName = name.toLowerCase();

    for( DuplicateBehaviour behaviour : DuplicateBehaviour.values() )
    {
      if( behaviour.name().toLowerCase().equals( lowCaseName ) )
        return behaviour;
    }

    throw new IllegalArgumentException( "No enum constant \"" + DuplicateBehaviour.class.getName() + "\" for name \"" + name + "\"" );
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy