@Test public void testMatches() { RangeCommunityHalf l = new RangeCommunityHalf(new SubRange(1, 3)); assertThat(l, matches(1)); assertThat(l, matches(2)); assertThat(l, matches(3)); assertThat(l, not(matches(0))); assertThat(l, not(matches(4))); }
@Override public boolean matches(int communityHalf) { return _range.includes(communityHalf); }
RangeCommunityHalf implements CommunityHalfExpr { @Override public boolean matches(int communityHalf) { return _range.includes(communityHalf); } }
RangeCommunityHalf implements CommunityHalfExpr { @Override public boolean matches(int communityHalf) { return _range.includes(communityHalf); } RangeCommunityHalf(@Nonnull SubRange range); }
RangeCommunityHalf implements CommunityHalfExpr { @Override public boolean matches(int communityHalf) { return _range.includes(communityHalf); } RangeCommunityHalf(@Nonnull SubRange range); @Override boolean dynamicMatchCommunity(); @Override boolean equals(@Nullable Object obj); @JsonProperty(PROP_RANGE) @Nonnull SubRange getRange(); @Override int hashCode(); @Override boolean matches(int communityHalf); @Override String toString(); }
RangeCommunityHalf implements CommunityHalfExpr { @Override public boolean matches(int communityHalf) { return _range.includes(communityHalf); } RangeCommunityHalf(@Nonnull SubRange range); @Override boolean dynamicMatchCommunity(); @Override boolean equals(@Nullable Object obj); @JsonProperty(PROP_RANGE) @Nonnull SubRange getRange(); @Override int hashCode(); @Override boolean matches(int communityHalf); @Override String toString(); static final RangeCommunityHalf ALL; }