Configuration a Sequence instance with frequently-used property
@see Berkeley#sequence(String, SequenceConfig)
768604
public M sequence(String sequenceKey, Long initialValue, Boolean increment) {
        SequenceConfig cfg = defaultSequenceConfig();
        if (null != initialValue) {
            cfg.setInitialValue(initialValue);
        }
        if (null != increment) {
            cfg.setDecrement(!increment);
        }
        getSequence(sequenceKey, cfg);
        return THIS();
    }
845806
public void setSequenceId(String v) {
    if (OutputElement_Type.featOkTst && ((OutputElement_Type)jcasType).casFeat_sequenceId == null)
      jcasType.jcas.throwFeatMissing("sequenceId", "edu.cmu.lti.oaqa.framework.types.OutputElement");
    jcasType.ll_cas.ll_setStringValue(addr, ((OutputElement_Type)jcasType).casFeatCode_sequenceId, v);}
695753
private void setSequenceNumber() {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Sequence id of the request is set to : {}", sequenceId);
        }
        inboundRequestMsg.setSequenceId(sequenceId);
        sequenceId++;
    }
621105
def _constructor(cls, mapping, configuration):
        
        attr = cls(mapping)
        attr._setattr('_sequence_type', configuration)

        return attr
154747
def cli(ctx, organism, sequence):
    
    return ctx.gi.annotations.set_sequence(organism, sequence)
61984
public static <T> Iterator<T> reorderIf( RandSeq randSeq, Iterator<T> sequence)
    {
    return randSeq==null? sequence : randSeq.reorder( sequence);
    }
875304
private void initSequential(final Boolean sequential) {

        // Try to retrieve the Sequential annotation at class level within class hierarchy
        final Sequential seq = ClassUtility.getLastClassAnnotation(this.getClass(), Sequential.class);

        // First try to get the annotation value (if present
        // Secondly by provided runtType argument
        // Thirdly (default case) use FALSE value
        setSequential(seq == null ? sequential == null ? DEFAULT_SEQUENTIAL_VALUE : sequential : seq.value());

    }
786656
private <T> Sequence<T> run(
      final QueryPlus<T> queryPlus,
      final Map<String, Object> responseContext,
      final UnaryOperator<TimelineLookup<String, ServerSelector>> timelineConverter
  )
  {
    return new SpecificQueryRunnable<>(queryPlus, responseContext).run(timelineConverter);
  }
1254119
public static Config parse(Properties properties) {
        ConfigBuilder config = new SimpleConfig();
        for (Object o : new TreeSet<>(properties.keySet())) {
            String key = o.toString();
            if (isPositional(key)) {
                String entryKey = entryKey(key);
                if (config.containsKey(entryKey)) {
                    config.getCollection(entryKey).add(properties.getProperty(key));
                } else {
                    ArrayList<Object> sequence = new ArrayList<>();
                    sequence.add(properties.getProperty(key));
                    config.putCollection(entryKey, sequence);
                }
            } else {
                config.put(key, properties.getProperty(key));
            }
        }
        return ImmutableConfig.copyOf(config);
    }
673603
public final SequenceLabel createSequence(final String seqString,
      final String seqType) {
    final SequenceLabel name = new SequenceLabel();
    name.setValue(seqString);
    name.setType(seqType);
    return name;
  }
772805
public void setCommandSequence(long sequence) {
    // For each increment of the sequence number, trigger query callbacks that are dependent on the specific sequence.
    for (long i = commandSequence + 1; i <= sequence; i++) {
      commandSequence = i;
      List<Runnable> queries = this.sequenceQueries.remove(commandSequence);
      if (queries != null) {
        for (Runnable query : queries) {
          query.run();
        }
      }
    }
  }
630084
private void sequenceQuery(
      long index,
      long sequence,
      long timestamp,
      RaftSession session,
      PrimitiveOperation operation,
      CompletableFuture<OperationResult> future) {
    // If the query's sequence number is greater than the session's current sequence number, queue the request for
    // handling once the state machine is caught up.
    long commandSequence = session.getCommandSequence();
    if (sequence > commandSequence) {
      log.trace("Registering query with sequence number " + sequence + " > " + commandSequence);
      session.registerSequenceQuery(sequence, () -> indexQuery(index, timestamp, session, operation, future));
    } else {
      indexQuery(index, timestamp, session, operation, future);
    }
  }
8748
def _set_sequence(cls, val):
        
        if db.engine.dialect.name == 'postgresql':  # pragma: no cover
            db.session.execute(
                "SELECT setval(pg_get_serial_sequence("
                "'{0}', 'recid'), :newval)".format(
                    cls.__tablename__), dict(newval=val))
485029
public String getSequence(Long beginPosition, Long endPosition)
	{
		byte[] sequenceByte = getSequenceByte(beginPosition, endPosition);
		if (sequenceByte != null)
			return new String(sequenceByte);
		return null;
	}
183433
function defineSequenceType(base, name, overrides) {
    /** @constructor */
    var ctor = function ctor() {};

    // Make this type inherit from the specified base.
    ctor.prototype = new base();

    // Attach overrides to the new sequence type's prototype.
    for (var override in overrides) {
      ctor.prototype[override] = overrides[override];
    }

    // Define a factory method that sets the new sequence's parent to the caller
    // and (optionally) applies any additional initialization logic.
    // Expose this as a chainable method so that we can do:
    // Lazy(...).map(...).filter(...).blah(...);
    var factory = function factory() {
      var sequence = new ctor();

      // Every sequence needs a reference to its parent in order to work.
      sequence.parent = this;

      // If a custom init function was supplied, call it now.
      if (sequence.init) {
        sequence.init.apply(sequence, arguments);
      }

      return sequence;
    };

    var methodNames = typeof name === 'string' ? [name] : name;
    for (var i = 0; i < methodNames.length; ++i) {
      base.prototype[methodNames[i]] = factory;
    }

    return ctor;
  }
140479
public void addAlignedSequence(S sequence){
		if(length == null){
			length = sequence.getLength();
		}
		if(sequence.getLength() != length){
			throw new IllegalArgumentException(sequence.getAccession() + " length = " + sequence.getLength() +
					" not equal to MSA length = " + length);
		}
		sequences.add(sequence);
	}
477039
public void registerSequenceQuery(long sequence, Runnable query) {
    // Add a query to be run once the session's sequence number reaches the given sequence number.
    List<Runnable> queries = this.sequenceQueries.computeIfAbsent(sequence, v -> new LinkedList<Runnable>());
    queries.add(query);
  }