src/main/java/seedu/address/logic/commands/ListCommand.java
/**
     * Returns a Predicate that checks if a studySpot contains the amenity queried.
     * @param queryAmenity
     */
Returns a Predicate that checks if a studySpot contains the amenity queried.
@param queryAmenity
Returns a Predicate that checks if a studySpot contains the amenity queried . @param queryAmenity
public static Predicate<StudySpot> containsAmenity(Amenity queryAmenity) {
        Predicate<StudySpot> studySpotContainAmenity = new Predicate<StudySpot>() {
            @Override
            public boolean test(StudySpot studySpot) {
                return studySpot.getAmenities().contains(queryAmenity);
            }
        };
        return studySpotContainAmenity;
    }
public static Predicate < StudySpot > containsAmenity ( Amenity queryAmenity ) { Predicate < StudySpot > studySpotContainAmenity = new Predicate < StudySpot > ( ) { @ Override public boolean test ( StudySpot studySpot ) { return studySpot . getAmenities ( ) . contains ( queryAmenity ) ; } } ; return studySpotContainAmenity ; }
Returns a Predicate that checks if a studySpot contains the amenity queried.
Returns a Predicate that checks if a studySpot contains the amenity queried .