Registers an enum. Returns true if registration is successful.
194027
public <T extends Enum<T>> boolean registerEnum(Class<T> enumClass)
    {
        return null == enumMapping.putIfAbsent(enumClass.getName(),
                EnumIO.newEnumIO(enumClass, this));
    }
910891
def registered? name
      registration_map = namespaces.map do |namespace|
        registered_in_namespace? name, namespace
      end
      registration_map.any?
    end
883894
def set_register(self, register, value):
        
        context = self.get_context()
        context[register] = value
        self.set_context(context)
1077949
private void registerListType(PContainer containerType) {
        PDescriptor itemType = containerType.itemDescriptor();
        if (itemType.getType() == PType.MAP ||
            itemType.getType() == PType.LIST ||
            itemType.getType() == PType.SET) {
            registerListType((PContainer) itemType);
        } else if (itemType.getType() == PType.ENUM ||
                   itemType.getType() == PType.MESSAGE){
            registerRecursively((PDeclaredDescriptor<?>) itemType);
        }
        if (containerType instanceof PMap) {
            PDescriptor keyType = ((PMap) containerType).keyDescriptor();
            if (keyType.getType() == PType.ENUM ||
                keyType.getType() == PType.MESSAGE){
                registerRecursively((PDeclaredDescriptor<?>) keyType);
            }
        }
        // Else ignore.
    }
414171
def register(self, mimetype):
        """"""
        def dec(func):
            self._reg[mimetype] = func
            return func
        return dec
753667
public static boolean isEnum(Element element) {
		if (element == null) {
			return false;
		} else if (element.getKind() == ElementKind.ENUM) {
			return true;
		} else {
			return false;
		}
	}
201248
def register_condition(self, *args, **kwds):
    
    if len(args) == 1 and len(kwds) == 0 and callable(args[0]):
      return self._add_condition(args[0])
    else:
      return partial(self._add_condition, *args, **kwds)
461149
public Mono<InstanceId> register(Registration registration) {
        Assert.notNull(registration, "'registration' must not be null");
        InstanceId id = generator.generateId(registration);
        Assert.notNull(id, "'id' must not be null");
        return repository.compute(id, (key, instance) -> {
            if (instance == null) {
                instance = Instance.create(key);
            }
            return Mono.just(instance.register(registration));
        }).map(Instance::getId);
    }
1015451
def register(cls):
    
    definition_name = make_definition_name(cls.__name__)
    REGISTRY[definition_name] = cls
    return cls
1321665
private boolean isOrdinal(int paramType) {
		switch ( paramType ) {
			case Types.INTEGER:
			case Types.NUMERIC:
			case Types.SMALLINT:
			case Types.TINYINT:
			case Types.BIGINT:
			case Types.DECIMAL: //for Oracle Driver
			case Types.DOUBLE:  //for Oracle Driver
			case Types.FLOAT:   //for Oracle Driver
				return true;
			case Types.CHAR:
			case Types.LONGVARCHAR:
			case Types.VARCHAR:
				return false;
			default:
				throw new HibernateException( "Unable to persist an Enum in a column of SQL Type: " + paramType );
		}
	}
543269
static void register() {
        // Unicode: "U+10FFFF" hex, min=4, max=6
        Transliterator.registerFactory("Any-Hex/Unicode", new Transliterator.Factory() {
            @Override
            public Transliterator getInstance(String ID) {
                return new EscapeTransliterator("Any-Hex/Unicode",
                                                "U+", "", 16, 4, true, null);
            }
        });

        // Java: "\\uFFFF" hex, min=4, max=4
        Transliterator.registerFactory("Any-Hex/Java", new Transliterator.Factory() {
            @Override
            public Transliterator getInstance(String ID) {
                return new EscapeTransliterator("Any-Hex/Java",
                                                "\\u", "", 16, 4, false, null);
            }
        });

        // C: "\\uFFFF" hex, min=4, max=4; \\U0010FFFF hex, min=8, max=8
        Transliterator.registerFactory("Any-Hex/C", new Transliterator.Factory() {
            @Override
            public Transliterator getInstance(String ID) {
                return new EscapeTransliterator("Any-Hex/C",
                                                "\\u", "", 16, 4, true,
                       new EscapeTransliterator("", "\\U", "", 16, 8, true, null));
            }
        });

        // XML: "&#x10FFFF;" hex, min=1, max=6
        Transliterator.registerFactory("Any-Hex/XML", new Transliterator.Factory() {
            @Override
            public Transliterator getInstance(String ID) {
                return new EscapeTransliterator("Any-Hex/XML",
                                                "&#x", ";", 16, 1, true, null);
            }
        });

        // XML10: "&1114111;" dec, min=1, max=7 (not really "Any-Hex")
        Transliterator.registerFactory("Any-Hex/XML10", new Transliterator.Factory() {
            @Override
            public Transliterator getInstance(String ID) {
                return new EscapeTransliterator("Any-Hex/XML10",
                                                "&#", ";", 10, 1, true, null);
            }
        });

        // Perl: "\\x{263A}" hex, min=1, max=6
        Transliterator.registerFactory("Any-Hex/Perl", new Transliterator.Factory() {
            @Override
            public Transliterator getInstance(String ID) {
                return new EscapeTransliterator("Any-Hex/Perl",
                                                "\\x{", "}", 16, 1, true, null);
            }
        });

        // Plain: "FFFF" hex, min=4, max=6
        Transliterator.registerFactory("Any-Hex/Plain", new Transliterator.Factory() {
            @Override
            public Transliterator getInstance(String ID) {
                return new EscapeTransliterator("Any-Hex/Plain",
                                                "", "", 16, 4, true, null);
            }
        });

        // Generic
        Transliterator.registerFactory("Any-Hex", new Transliterator.Factory() {
            @Override
            public Transliterator getInstance(String ID) {
                return new EscapeTransliterator("Any-Hex",
                                                "\\u", "", 16, 4, false, null);
            }
        });
    }
1346486
def add(self, name, value, bitmask=DEFMASK):
        
        _add_enum_member(self._eid, name, value, bitmask)
973519
def register(cls):
        
        if not cls.IS_LOADED:
            cls.IS_LOADED = True

            yaml.add_constructor('!param', Parameter.parameter_constructor, Loader=yaml.SafeLoader)
            yaml.add_constructor('!env', EnvironmentVariable.parameter_constructor, Loader=yaml.SafeLoader)
670055
public SerializerRegistry register(Class<?> type) {
    if (type == null)
      throw new NullPointerException("type cannot be null");
    return register(type, calculateTypeId(type));
  }
230044
public function registerEnumIcons($enumClass, array $icons)
    {
        $this->map = array_merge($this->map, [shorten($enumClass) => $icons]);
    }
350810
public boolean register(Invocation invocation) {
        final long callId;
        boolean force = invocation.op.isUrgent() || invocation.isRetryCandidate();
        try {
            callId = force ? callIdSequence.forceNext() : callIdSequence.next();
        } catch (HazelcastOverloadException e) {
            throw new HazelcastOverloadException("Failed to start invocation due to overload: " + invocation, e);
        }
        try {
            // fails with IllegalStateException if the operation is already active
            setCallId(invocation.op, callId);
        } catch (IllegalStateException e) {
            callIdSequence.complete();
            throw e;
        }
        invocations.put(callId, invocation);
        if (!alive) {
            invocation.notifyError(new HazelcastInstanceNotActiveException());
            return false;
        }
        return true;
    }
282226
public function register()
  {
    $this->app->singleton('command.make.enum', function ($app) {
      return $app['Artisaninweb\Enum\Commands\MakeEnumCommand'];
    });

    $this->app->bindIf('EnumMap', function () {
      return new EnumMap(DummyEnum::class);
    });

    $this->commands('command.make.enum');
  }