title: What is the NamedTuple alternative in Java?
body: <p>I am trying to turn some python code into java and one of the obstacles I have come across is the use of a namedtuple. It seems Java does not use tuples so I was wondering what could I use as an alternative.</p>
  
  <pre><code>#part of the python code:
  
  @staticmethod
  def stream_file(fieldnames, id):
     tuple = namedtuple("RECORD", " ".join(fieldnames))
     ...
     data = [x for x in arr]
     yield tuple._make(data)
  </code></pre>