Daniel
Daniel

Reputation: 370

What are classes named somethingEntity?

I see that in Java there are some implementations named somethingEntity (HttpEntity, FileEntity,InputStreamEntity, StringEntity,...) - found them here

  1. Why do we have them (reason, usage)?
  2. What is this "Entity" at the end? because it seems it is different from Java Entities

Upvotes: 2

Views: 99

Answers (1)

Nikolas
Nikolas

Reputation: 44486

These classes are named with the suffix Entity because they are implementations of the HttpEntity class. Otherwise, they might be confused with InputStream, String, File, Serializable etc. classes which are included in Java SE. This is an example of the naming convention.

Summary: A naming convention and to distinguish from Java SE classes.

Upvotes: 1

Related Questions