S
Stefan Ram
What would be good names for the following interfaces?
Where »good« means: adhering to common naming conventions and
suggesting the contents of the interface just by the name of
the interface to as many readers as possible.
The interfaces are parts of the package »gregorian«, so that
information that they are related to the gregorian calendar
does not need to be repeated in the interface names.
public interface ?0
{ public int getYear();
public int getMonth();
public int getDay();
public int getHours();
public int getMinutes();
public double getSeconds();
/* time zone information follows */
public int getDirection();
public int getShiftHours();
public int getShiftMinutes(); }
public interface ?1
{ public void setYear( int year );
public void setMonth( int month );
public void setDay( int day );
public void setHours( int hours );
public void setMinutes( int minutes );
public void setSeconds( double seconds );
public void setDirection( int direction );
public void setShiftHours( int shiftHours );
public void setShiftMinutes( int shiftMinutes ); }
public interface ?2
extends ?0, ?1 {}
/* some additional operations beyond mere getters
and setters, I already have a satisfactory name
for this interface */
public interface ?3
{ public void add( final double addend );
public java.lang.Object sum( final double addend );
public double doubleValue();
public void assureBroken();
public void shiftTimeZone( int minutes ); }
/* a date and time together with some additional
operations for it. */
public interface ?4
extends ?2, ?3 {}
What I am interested in most, is whether there are common
names for an interface of setters ?1, and interface of getters
?0 and for the combination ?2 of these two allowing data
access but no other operations ?3 yet.
Then I have the need to tell between a small interface ?2 just
for data access and a larger interface ?4 for data acces ?3
plus additional operations ?3.
(?3 could be broken down in other interfaces, too. But that
would not be in the scope of this post.)
Where »good« means: adhering to common naming conventions and
suggesting the contents of the interface just by the name of
the interface to as many readers as possible.
The interfaces are parts of the package »gregorian«, so that
information that they are related to the gregorian calendar
does not need to be repeated in the interface names.
public interface ?0
{ public int getYear();
public int getMonth();
public int getDay();
public int getHours();
public int getMinutes();
public double getSeconds();
/* time zone information follows */
public int getDirection();
public int getShiftHours();
public int getShiftMinutes(); }
public interface ?1
{ public void setYear( int year );
public void setMonth( int month );
public void setDay( int day );
public void setHours( int hours );
public void setMinutes( int minutes );
public void setSeconds( double seconds );
public void setDirection( int direction );
public void setShiftHours( int shiftHours );
public void setShiftMinutes( int shiftMinutes ); }
public interface ?2
extends ?0, ?1 {}
/* some additional operations beyond mere getters
and setters, I already have a satisfactory name
for this interface */
public interface ?3
{ public void add( final double addend );
public java.lang.Object sum( final double addend );
public double doubleValue();
public void assureBroken();
public void shiftTimeZone( int minutes ); }
/* a date and time together with some additional
operations for it. */
public interface ?4
extends ?2, ?3 {}
What I am interested in most, is whether there are common
names for an interface of setters ?1, and interface of getters
?0 and for the combination ?2 of these two allowing data
access but no other operations ?3 yet.
Then I have the need to tell between a small interface ?2 just
for data access and a larger interface ?4 for data acces ?3
plus additional operations ?3.
(?3 could be broken down in other interfaces, too. But that
would not be in the scope of this post.)