Chaining is an object-oriented programming technique where methods return the object on which they were called so that another method may be called on the same object, thus forming a method chain.
Questions tagged [chaining]
1000 questions
-2
votes
1 answer
count program using hash table and chaining
This assignment is designed to use a hash table to count the number of unique addresses accessed
by a program. You need to implement a program called count. The input of the count program
is a trace consisting of 64-bit addresses and you are…

akb712
- 1
-2
votes
1 answer
Chaining Constructors
I am trying to better understand chaining of constructors in C# and I have run into the following issue.
class Item
{
private string _name;
private string _category;
private int _sku;
private double _price;
// default values
…

PBrenek
- 561
- 1
- 8
- 24
-2
votes
2 answers
Processing a Queue in Parallel
I have a class which processes messages:
public abstract class ProcessingBase {
public bool IsBusy { get; set; }
public Queue PendingMessages { get; private set; }
public abstract MessageProcessingResult Process();
…

Echilon
- 10,064
- 33
- 131
- 217
-3
votes
1 answer
Propper way to chain a bunch of jobs when a user is buying a subscription
I'm in the process of building a web app where users can buy subscriptions for an online magazine.
The back-end is powered by PHP (Laravel) and the front-end is very light, just HTML/CSS and a little bit of vanilla JavaScript.
I'm curious to know…

Cosmin
- 864
- 3
- 16
- 34
-3
votes
3 answers
How to chain and serialize functions by overloading the | operator
I'm trying to figure out how to generically overload the operator|() for a given base class object to serialize or chain function calls that are similar to how pipes or operator<<() works... I'd like to chain them through the pipe operator... This…

Francis Cugler
- 7,788
- 2
- 28
- 59
-3
votes
1 answer
How this code works? (jQuery chaining)
I got this code from the jQuery plugin tutorial. however, my question is a javascript/jquery question.
In the code you can see that the filter() returns an object, which contains a collection of the "filtered" objects. and the append() is…

yossi
- 3,090
- 7
- 45
- 65
-3
votes
1 answer
Rails named queries to grails
I have this in rails:
default_scope { order('created_at DESC') }
scope :by_source_name, ->(source_name) { where('source_name = ?', source_name) if source_name }
scope :by_check_name, ->(check_name) { where('check_name = ?', check_name.upcase)…

user903772
- 1,554
- 5
- 32
- 55
-4
votes
2 answers
How to chain functions?
I am trying to understand the mechanics of chained functions such as
>>> 'hello'.upper()
'HELLO'
(the chain can be longer, I do not have a good example in my head right now - something like…

WoJ
- 27,165
- 48
- 180
- 345
-4
votes
1 answer
chaining functions on Swift
I recently started out to learning Swift which is completely different from my previous work perspective. I found it is interesting like doing the quiz when I am writing the codes..But I have been struggling with this puzzle for a couple of hours…

Laura
- 11
- 3
-5
votes
2 answers
C# method is not returning object - method chaining
I came across the post on stackoverflow that provided solution to question by chaining two methods. The answer looked something like this:
public x DoThis()
{
//do something
return this;
}
public x DoThat ()
{
//do something else
…

tipitoe
- 11
- 2
- 8