Interface naming for adjectives

interface, naming-conventions, oop

Solution

I tend to use `-able` suffix. There are many good examples of this naming conventions also in the Java library such as:

- Cloneable

- Readable

- Iterable

- Comparable

- Observable

- Closeable

- Flushable

- Serializable

For example something that has tags would be named `Taggable` under this naming convention, something that has a timestamp is `Loggable` since:

Timestamps are typically used for logging events, in which case each event in a log is marked with a timestamp. In filesystems, timestamp may mean the stored date/time of creation or modification of a file.

Problem

OK, so it's easy to name an interface (or class for that matter) if you can easily think of a noun: User, Window, Database, Stream, etc. What about an adjective or adjective concept? e.g. something that has a timestamp (HasTimestamp, Timestamped, Timestampable...?) or something that is tracked or watched (Trackable, IsTracked, Watchable, IsWatched...?)

Original source