@Test public void testIs32BitRange() { LongSpace s1 = LongSpace.builder().including(Range.closed(4L, 44L)).build(); LongSpace s2 = LongSpace.builder().including(Range.closed(-4L, 44L)).build(); LongSpace s3 = LongSpace.builder().including(Range.singleton(4294967296L)).build(); assertTrue(BgpRouteConstraints.is32BitRange(s1)); assertFalse(BgpRouteConstraints.is32BitRange(s2)); assertFalse(BgpRouteConstraints.is32BitRange(s3)); }
@VisibleForTesting static boolean is32BitRange(@Nonnull LongSpace longSpace) { return THIRTY_TWO_BIT_RANGE.contains(longSpace); }
BgpRouteConstraints { @VisibleForTesting static boolean is32BitRange(@Nonnull LongSpace longSpace) { return THIRTY_TWO_BIT_RANGE.contains(longSpace); } }
BgpRouteConstraints { @VisibleForTesting static boolean is32BitRange(@Nonnull LongSpace longSpace) { return THIRTY_TWO_BIT_RANGE.contains(longSpace); } @JsonCreator private  BgpRouteConstraints(
      @Nullable @JsonProperty(PROP_PREFIX) PrefixSpace prefix,
      @JsonProperty(PROP_COMPLEMENT_PREFIX) boolean complementPrefix,
      @Nullable @JsonProperty(PROP_LOCAL_PREFERENCE) LongSpace.Builder localPreference,
      @Nullable @JsonProperty(PROP_MED) LongSpace.Builder med,
      @Nullable @JsonProperty(PROP_COMMUNITIES) RegexConstraints communities,
      @Nullable @JsonProperty(PROP_AS_PATH) RegexConstraints asPath); private  BgpRouteConstraints(
      @Nullable PrefixSpace prefix,
      boolean complementPrefix,
      @Nullable LongSpace localPreference,
      @Nullable LongSpace med,
      @Nullable RegexConstraints communities,
      @Nullable RegexConstraints asPath); }
BgpRouteConstraints { @VisibleForTesting static boolean is32BitRange(@Nonnull LongSpace longSpace) { return THIRTY_TWO_BIT_RANGE.contains(longSpace); } @JsonCreator private  BgpRouteConstraints(
      @Nullable @JsonProperty(PROP_PREFIX) PrefixSpace prefix,
      @JsonProperty(PROP_COMPLEMENT_PREFIX) boolean complementPrefix,
      @Nullable @JsonProperty(PROP_LOCAL_PREFERENCE) LongSpace.Builder localPreference,
      @Nullable @JsonProperty(PROP_MED) LongSpace.Builder med,
      @Nullable @JsonProperty(PROP_COMMUNITIES) RegexConstraints communities,
      @Nullable @JsonProperty(PROP_AS_PATH) RegexConstraints asPath); private  BgpRouteConstraints(
      @Nullable PrefixSpace prefix,
      boolean complementPrefix,
      @Nullable LongSpace localPreference,
      @Nullable LongSpace med,
      @Nullable RegexConstraints communities,
      @Nullable RegexConstraints asPath); static Builder builder(); @JsonProperty(PROP_PREFIX) @Nonnull PrefixSpace getPrefix(); @JsonProperty(PROP_COMPLEMENT_PREFIX) boolean getComplementPrefix(); @JsonProperty(PROP_LOCAL_PREFERENCE) @Nonnull LongSpace getLocalPreference(); @JsonProperty(PROP_MED) @Nonnull LongSpace getMed(); @JsonProperty(PROP_COMMUNITIES) @Nonnull RegexConstraints getCommunities(); @JsonProperty(PROP_AS_PATH) @Nonnull RegexConstraints getAsPath(); }
BgpRouteConstraints { @VisibleForTesting static boolean is32BitRange(@Nonnull LongSpace longSpace) { return THIRTY_TWO_BIT_RANGE.contains(longSpace); } @JsonCreator private  BgpRouteConstraints(
      @Nullable @JsonProperty(PROP_PREFIX) PrefixSpace prefix,
      @JsonProperty(PROP_COMPLEMENT_PREFIX) boolean complementPrefix,
      @Nullable @JsonProperty(PROP_LOCAL_PREFERENCE) LongSpace.Builder localPreference,
      @Nullable @JsonProperty(PROP_MED) LongSpace.Builder med,
      @Nullable @JsonProperty(PROP_COMMUNITIES) RegexConstraints communities,
      @Nullable @JsonProperty(PROP_AS_PATH) RegexConstraints asPath); private  BgpRouteConstraints(
      @Nullable PrefixSpace prefix,
      boolean complementPrefix,
      @Nullable LongSpace localPreference,
      @Nullable LongSpace med,
      @Nullable RegexConstraints communities,
      @Nullable RegexConstraints asPath); static Builder builder(); @JsonProperty(PROP_PREFIX) @Nonnull PrefixSpace getPrefix(); @JsonProperty(PROP_COMPLEMENT_PREFIX) boolean getComplementPrefix(); @JsonProperty(PROP_LOCAL_PREFERENCE) @Nonnull LongSpace getLocalPreference(); @JsonProperty(PROP_MED) @Nonnull LongSpace getMed(); @JsonProperty(PROP_COMMUNITIES) @Nonnull RegexConstraints getCommunities(); @JsonProperty(PROP_AS_PATH) @Nonnull RegexConstraints getAsPath();  }