The ornamental design for an endcap for a container, as shown and described.
FIG. 1 is a perspective view of a new design for an end cap for a container;
FIG. 2 is a front side elevational view thereof;
FIG. 3 is a right side elevational view thereof;
FIG. 4 is a rear side elevational view thereof;
FIG. 5 is a left side elevational view thereof;
FIG. 6 is a top plan view thereof; and,
FIG. 7 is a bottom plan view thereof.
The evenly-spaced broken lines in the drawings represent unclaimed environmental subject matter; the dash-dot-dash lines represent boundaries of the claim.