target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testQueryValueBuildFlagRegionsOverlappingAndGlobalRegionDenyRegionOverride() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); LocalPlayer nonMember = mock.createPlayer(); LocalPlayer memberOne = mock.createPlayer(); LocalPlayer memberBoth = mock.createPlayer(); Protecte...
@Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(Regi...
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(Regi...
@Test public void testQueryValueBuildFlagRegionsOverlappingAndGlobalRegionDenyRegionOverrideDenyAndAllow() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); LocalPlayer nonMember = mock.createPlayer(); LocalPlayer memberOne = mock.createPlayer(); LocalPlayer memberBoth = mock.createPlayer...
@Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(Regi...
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(Regi...
@Test public void testQueryValueBuildFlagRegionsOverlappingAndGlobalRegionAllow() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); LocalPlayer nonMember = mock.createPlayer(); LocalPlayer memberOne = mock.createPlayer(); LocalPlayer memberBoth = mock.createPlayer(); ProtectedRegion globa...
@Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(Regi...
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(Regi...
@Test public void testGetMembershipPassthroughRegions() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(Flags.PASSTHROUGH, State.ALLOW); region = mock.add(0); region.setFlag(Flags.PASSTHROUGH, State.ALLOW); LocalPlayer player = mock.c...
public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPriority) { break; } if (g...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
@Test public void testQueryValueBuildFlagRegionsOverlappingAndGlobalRegionMembership() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); LocalPlayer globalMember = mock.createPlayer(); LocalPlayer nonMember = mock.createPlayer(); LocalPlayer memberOne = mock.createPlayer(); LocalPlayer me...
@Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(Regi...
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(Regi...
@Test public void testQueryValueBuildFlagRegionsOverlappingAndGlobalRegionMembershipAndGlobalDeny() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); LocalPlayer globalMember = mock.createPlayer(); LocalPlayer nonMember = mock.createPlayer(); LocalPlayer memberOne = mock.createPlayer(); L...
@Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(Regi...
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(Regi...
@Test public void testQueryValueBuildFlagRegionsOverlappingAndGlobalRegionMembershipAndGlobalAllow() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); LocalPlayer globalMember = mock.createPlayer(); LocalPlayer nonMember = mock.createPlayer(); LocalPlayer memberOne = mock.createPlayer(); ...
@Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(Regi...
FlagValueCalculator { @Nullable public <V> V queryValue(@Nullable RegionAssociable subject, Flag<V> flag) { Collection<V> values = queryAllValues(subject, flag, true); return flag.chooseValue(values); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(Regi...
@Test public void testQueryAllValuesTwoWithSamePriority() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1"); r...
public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
@Test public void testQueryAllValuesTwoWithDuplicateFlagValues() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "tes...
public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
@Test public void testQueryAllValuesWithHigherPriority() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion region = mock.add(10); region.setFlag(stringFlag1, "test1"); r...
public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
@Test public void testQueryAllValuesWithTwoElevatedPriorities() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion region = mock.add(10); region.setFlag(stringFlag1, "tes...
public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
@Test public void testQueryAllValuesParentChildWithSamePriority() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion parent1 = mock.add(10); parent1.setFlag(stringFlag1, ...
public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
@Test public void testQueryAllValuesParentWithHigherPriority() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion parent1 = mock.add(20); parent1.setFlag(stringFlag1, "te...
public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
@Test public void testQueryAllValuesParentWithLowerPriority() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion parent1 = mock.add(5); parent1.setFlag(stringFlag1, "test...
public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
@Test public void testGetMembershipPassthroughAndRegion() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(Flags.PASSTHROUGH, State.ALLOW); region = mock.add(0); LocalPlayer player = mock.createPlayer(); FlagValueCalculator result = mo...
public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPriority) { break; } if (g...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
@Test public void testQueryAllValuesThirdRegionWithHigherPriorityThanParentChild() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion parent1 = mock.add(5); parent1.setFl...
public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
@Test public void testQueryAllValuesParentsAndInheritance() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion parent1 = mock.add(5); parent1.setFlag(stringFlag1, "test1"...
public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
@Test public void testQueryAllValuesParentsAndInheritanceHighPriorityAndNoFlag() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); StateFlag flag1 = new StateFlag("test1", false); Prote...
public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
@Test public void testQueryAllValuesParentWithSamePriorityAsHighest() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); StateFlag flag1 = new StateFlag("test1", false); ProtectedRegion ...
public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
FlagValueCalculator { public <V> Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag) { return queryAllValues(subject, flag, false); } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State que...
@Test public void testGetEffectivePriority() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(30); FlagValueCalculator result = mock.getFlagCalculator(); assertThat(result.getPriority(region), is(30)); }
public int getPriority(final ProtectedRegion region) { if (region == globalRegion) { return Integer.MIN_VALUE; } else { return region.getPriority(); } }
FlagValueCalculator { public int getPriority(final ProtectedRegion region) { if (region == globalRegion) { return Integer.MIN_VALUE; } else { return region.getPriority(); } } }
FlagValueCalculator { public int getPriority(final ProtectedRegion region) { if (region == globalRegion) { return Integer.MIN_VALUE; } else { return region.getPriority(); } } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public int getPriority(final ProtectedRegion region) { if (region == globalRegion) { return Integer.MIN_VALUE; } else { return region.getPriority(); } } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Null...
FlagValueCalculator { public int getPriority(final ProtectedRegion region) { if (region == globalRegion) { return Integer.MIN_VALUE; } else { return region.getPriority(); } } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Null...
@Test public void testGetEffectivePriorityGlobalRegion() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.global(); FlagValueCalculator result = mock.getFlagCalculator(); assertThat(result.getPriority(region), is(Integer.MIN_VALUE)); }
public int getPriority(final ProtectedRegion region) { if (region == globalRegion) { return Integer.MIN_VALUE; } else { return region.getPriority(); } }
FlagValueCalculator { public int getPriority(final ProtectedRegion region) { if (region == globalRegion) { return Integer.MIN_VALUE; } else { return region.getPriority(); } } }
FlagValueCalculator { public int getPriority(final ProtectedRegion region) { if (region == globalRegion) { return Integer.MIN_VALUE; } else { return region.getPriority(); } } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); }
FlagValueCalculator { public int getPriority(final ProtectedRegion region) { if (region == globalRegion) { return Integer.MIN_VALUE; } else { return region.getPriority(); } } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Null...
FlagValueCalculator { public int getPriority(final ProtectedRegion region) { if (region == globalRegion) { return Integer.MIN_VALUE; } else { return region.getPriority(); } } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Null...
@Test public void testGetEffectiveFlagSingleRegion() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1"); region...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagWithALLGroupAndNonMember() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "tes...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagWithALLGroupAndNull() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1");...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagNONMEMBERSGroupNonMember() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "tes...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetMembershipPassthroughAndRegionMemberOf() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(Flags.PASSTHROUGH, State.ALLOW); region = mock.add(0); LocalPlayer player = mock.createPlayer(); region.getMembers().add...
public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPriority) { break; } if (g...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
@Test public void testGetEffectiveFlagNONMEMBERSGroupNull() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1");...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagNONOWNERSGroupNonMember() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagMEMBERSGroupNonMember() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1"...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagMEMBERSGroupNull() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1"); re...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagMEMBERSGroupMember() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1"); ...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagMEMBERSGroupOwner() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1"); r...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagOWNERSGroupOwner() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1"); re...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagOWNERSGroupMember() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1"); r...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagNONOWNERSGroupOwner() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1");...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagNONMEMBERSGroupOwner() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1")...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetMembershipPassthroughAndRegionMemberOfAndAnotherNot() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(Flags.PASSTHROUGH, State.ALLOW); region = mock.add(0); LocalPlayer player = mock.createPlayer(); region.get...
public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPriority) { break; } if (g...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
@Test public void testGetEffectiveFlagNONOWNERSGroupMember() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1")...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagNONOWNERSNonMember() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(stringFlag1, "test1"); ...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagThreeInheritance() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion parent1 = mock.add(0); parent1.setFlag(stringFlag1, "test1"); ...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagThreeInheritanceMiddleOverride() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion parent1 = mock.add(0); parent1.setFlag(stringFla...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagThreeInheritanceLastOverride() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion parent1 = mock.add(0); parent1.setFlag(stringFlag1...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagInheritanceAndDifferingGroups() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion parent1 = mock.add(0); parent1.setFlag(stringFlag...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagInheritanceAndDifferingGroupsMemberOnChild() throws Exception { StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion parent1 = mock.add(0); parent1.setFl...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagInheritanceAndDifferingGroupsMemberOnParent() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion parent1 = mock.add(0); parent1.setF...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagInheritanceAndDifferingGroupsMemberOnParentFlagOnBottom() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion parent1 = mock.add(0); ...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagInheritanceAndDifferingGroupsMemberOnParentFlagOnBottomGroupOutside() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); StringFlag stringFlag1 = new StringFlag("string1"); StringFlag stringFlag2 = new StringFlag("string2"); ProtectedRegion parent1 = m...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetMembershipPassthroughAndRegionMemberOfAndAnotherNotWithHigherPriority() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(Flags.PASSTHROUGH, State.ALLOW); region = mock.add(0); LocalPlayer player = mock.createPl...
public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPriority) { break; } if (g...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
@Test public void testGetEffectiveFlagGlobalRegionBuild() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion global = mock.global(); FlagValueCalculator result = mock.getFlagCalculator(); assertThat(result.getEffectiveFlag(global, Flags.BUILD, null), equalTo(null)); }
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagGlobalRegionBuildDeny() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion global = mock.global(); global.setFlag(Flags.BUILD, State.DENY); FlagValueCalculator result = mock.getFlagCalculator(); assertThat(result.getEffectiveFlag(global...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetEffectiveFlagGlobalRegionBuildAllow() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion global = mock.global(); global.setFlag(Flags.BUILD, State.ALLOW); FlagValueCalculator result = mock.getFlagCalculator(); assertThat(result.getEffectiveFlag(glob...
@SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || passthrough != State.ALLOW...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
FlagValueCalculator { @SuppressWarnings("unchecked") public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject) { if (region == globalRegion) { if (flag == Flags.PASSTHROUGH) { State passthrough = region.getFlag(Flags.PASSTHROUGH); if (passthrough == State.DENY || pass...
@Test public void testGetMembershipPassthroughAndRegionMemberOfWithHigherPriorityAndAnotherNot() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(0); region.setFlag(Flags.PASSTHROUGH, State.ALLOW); region = mock.add(10); LocalPlayer player = mock.createP...
public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPriority) { break; } if (g...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
FlagValueCalculator { public Result getMembership(RegionAssociable subject) { checkNotNull(subject); int minimumPriority = Integer.MIN_VALUE; Result result = Result.NO_REGIONS; Set<ProtectedRegion> ignoredRegions = Sets.newHashSet(); for (ProtectedRegion region : getApplicable()) { if (getPriority(region) < minimumPrio...
@Test public void shouldContains() throws Exception { Files.write(directory.resolve("file"), "content".getBytes(StandardCharsets.UTF_8)); assertThat(directory, contains("file")); }
@Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Mat...
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Mat...
@Test public void shouldSymlinkNotExists() throws Exception { Path file = directory.resolve("file"); Path fileLinked = directory.resolve("file-linked"); Files.createSymbolicLink(file, fileLinked); assertThat(file, not(exists())); }
@Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Pat...
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Pat...
@Test public void shouldSymlinkExistsIfOptionConfigured() throws Exception { Path file = directory.resolve("file"); Path fileLinked = directory.resolve("file-linked"); Files.createSymbolicLink(file, fileLinked); System.out.println(Files.isSymbolicLink(file)); assertThat(file, exists(LinkOption.NOFOLLOW_LINKS)); }
@Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Pat...
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Pat...
@Test public void shouldHasFilesCount() throws Exception { Files.write(directory.resolve("first"), "content".getBytes(StandardCharsets.UTF_8)); Files.write(directory.resolve("second"), "content".getBytes(StandardCharsets.UTF_8)); assertThat(directory, hasFilesCount(2)); }
@Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); }
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } }
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory stati...
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory stati...
@Test public void shouldHasFilesCountByGlob() throws Exception { Files.write(directory.resolve("first-file"), "content".getBytes(StandardCharsets.UTF_8)); Files.write(directory.resolve("second-file"), "content".getBytes(StandardCharsets.UTF_8)); Files.write(directory.resolve("other"), "content".getBytes(StandardCharset...
@Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); }
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } }
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory stati...
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory stati...
@Test(expected = AssertionError.class) public void shouldFailIfNotHasSuchFiles() throws Exception { assertThat(directory, hasFilesCount(2)); }
@Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); }
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } }
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory stati...
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory stati...
@Test(expected = AssertionError.class) public void shouldFailIfNotHasSuchFilesByGlob() throws Exception { Files.write(directory.resolve("first"), "content".getBytes(StandardCharsets.UTF_8)); assertThat(directory, hasFilesCount(2, "*-file")); }
@Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); }
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } }
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory stati...
PathMatchers { @Factory public static Matcher<Path> hasFilesCount(int expectedCount) { return new FilesCount(expectedCount); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory stati...
@Test(expected = AssertionError.class) public void shouldThrowAssertionErrorOnDifferentURIs() throws Exception { assertThat(ACTUAL_URI, sameAsURI(EXPECTED_URI)); }
@Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); }
SameAsURIMatcher extends TypeSafeDiagnosingMatcher<URI> { @Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); } }
SameAsURIMatcher extends TypeSafeDiagnosingMatcher<URI> { @Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); } private SameAsURIMatcher(URI expectedUri); }
SameAsURIMatcher extends TypeSafeDiagnosingMatcher<URI> { @Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); } private SameAsURIMatcher(URI expectedUri); @Override void describeTo(Description description); SameAsURIMatcher filteredWith(UriDiffFilter... filter...
SameAsURIMatcher extends TypeSafeDiagnosingMatcher<URI> { @Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); } private SameAsURIMatcher(URI expectedUri); @Override void describeTo(Description description); SameAsURIMatcher filteredWith(UriDiffFilter... filter...
@Test(expected = AssertionError.class) public void shouldThrowAssertionErrorWithoutFilters() throws Exception { assertThat(ACTUAL_AS_EXPECTED_WITH_PARAM_AND_SCHEME_URI, sameAsURI(EXPECTED_URI)); }
@Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); }
SameAsURIMatcher extends TypeSafeDiagnosingMatcher<URI> { @Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); } }
SameAsURIMatcher extends TypeSafeDiagnosingMatcher<URI> { @Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); } private SameAsURIMatcher(URI expectedUri); }
SameAsURIMatcher extends TypeSafeDiagnosingMatcher<URI> { @Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); } private SameAsURIMatcher(URI expectedUri); @Override void describeTo(Description description); SameAsURIMatcher filteredWith(UriDiffFilter... filter...
SameAsURIMatcher extends TypeSafeDiagnosingMatcher<URI> { @Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); } private SameAsURIMatcher(URI expectedUri); @Override void describeTo(Description description); SameAsURIMatcher filteredWith(UriDiffFilter... filter...
@Test public void shouldUseDefaultReport() throws Exception { Description description = new StringDescription(); sameAsURI(EXPECTED_URI).describeMismatch(ACTUAL_URI, description); assertThat("Description should contain actual and diff", description.toString(), both(containsString(UriDiffer.diff().actual(ACTUAL_URI).exp...
@Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); }
SameAsURIMatcher extends TypeSafeDiagnosingMatcher<URI> { @Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); } }
SameAsURIMatcher extends TypeSafeDiagnosingMatcher<URI> { @Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); } private SameAsURIMatcher(URI expectedUri); }
SameAsURIMatcher extends TypeSafeDiagnosingMatcher<URI> { @Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); } private SameAsURIMatcher(URI expectedUri); @Override void describeTo(Description description); SameAsURIMatcher filteredWith(UriDiffFilter... filter...
SameAsURIMatcher extends TypeSafeDiagnosingMatcher<URI> { @Factory public static SameAsURIMatcher sameAsURI(URI expectedUri) { return new SameAsURIMatcher(expectedUri); } private SameAsURIMatcher(URI expectedUri); @Override void describeTo(Description description); SameAsURIMatcher filteredWith(UriDiffFilter... filter...
@Test public void testEqualsSymmetric() { Wrapper<Object> objectWrapper1 = createTestWrapper(); Wrapper<Object> objectWrapper2 = createTestWrapper().wrap(objectWrapper1); Wrapper<Object> objectWrapper3 = createTestWrapper().wrap(objectWrapper1); String errorMessage = "Equals method should be symmetric"; Assert.assertTh...
public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; }
Wrapper { public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; } }
Wrapper { public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; } }
Wrapper { public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; } Wrapper<T> wrap(T wrapped); T getWrapped(); void setPosition(int position); int getPosition(); @Override int hashCode(); @Override @SuppressWarnings("unchecked") boolean equals(Object obj); @Override String toString(); abstract boolea...
Wrapper { public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; } Wrapper<T> wrap(T wrapped); T getWrapped(); void setPosition(int position); int getPosition(); @Override int hashCode(); @Override @SuppressWarnings("unchecked") boolean equals(Object obj); @Override String toString(); abstract boolea...
@Test(expected = AssertionError.class) public void shouldFailIfNotContains() throws Exception { assertThat(directory, contains("file")); }
@Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Mat...
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Mat...
@Test public void testEqualsTransitive() { Wrapper<Object> objectWrapper1 = createTestWrapper(); Wrapper<Object> objectWrapper2 = createTestWrapper().wrap(objectWrapper1); Wrapper<Object> objectWrapper3 = createTestWrapper().wrap(objectWrapper1); Wrapper<Object> objectWrapper4 = createTestWrapper().wrap(objectWrapper1)...
public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; }
Wrapper { public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; } }
Wrapper { public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; } }
Wrapper { public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; } Wrapper<T> wrap(T wrapped); T getWrapped(); void setPosition(int position); int getPosition(); @Override int hashCode(); @Override @SuppressWarnings("unchecked") boolean equals(Object obj); @Override String toString(); abstract boolea...
Wrapper { public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; } Wrapper<T> wrap(T wrapped); T getWrapped(); void setPosition(int position); int getPosition(); @Override int hashCode(); @Override @SuppressWarnings("unchecked") boolean equals(Object obj); @Override String toString(); abstract boolea...
@Test public void testEqualsConsistent() { Wrapper<Object> objectWrapper1 = createTestWrapper(); Wrapper<Object> objectWrapper2 = createTestWrapper().wrap(objectWrapper1); Wrapper<Object> objectWrapper3 = createTestWrapper().wrap(objectWrapper1); final int attempts = 10; for (int i = 0; i < attempts; i++) { Assert.asse...
public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; }
Wrapper { public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; } }
Wrapper { public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; } }
Wrapper { public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; } Wrapper<T> wrap(T wrapped); T getWrapped(); void setPosition(int position); int getPosition(); @Override int hashCode(); @Override @SuppressWarnings("unchecked") boolean equals(Object obj); @Override String toString(); abstract boolea...
Wrapper { public Wrapper<T> wrap(T wrapped) { this.wrapped = wrapped; return this; } Wrapper<T> wrap(T wrapped); T getWrapped(); void setPosition(int position); int getPosition(); @Override int hashCode(); @Override @SuppressWarnings("unchecked") boolean equals(Object obj); @Override String toString(); abstract boolea...
@Test public void listNotSameOrderButEqual() throws Exception { List<String> actual = asList("1", "2", "3"); List<String> expected = asList("3", "2", "1"); assertThat(actual, HasSameItemsAsListMatcher.hasSameItemsAsList(expected)); }
@Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); HasSameItemsAsListMatch...
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); HasSameItemsAsListMatch...
@Test(expected = AssertionError.class) public void listNotEqualSortedAndContainsNewItems() throws Exception { List<Integer> actual = asList(1, 2, 3, 4); List<Integer> expected = asList(3, 2, 1); assertThat(actual, HasSameItemsAsListMatcher.hasSameItemsAsList(expected)); }
@Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); HasSameItemsAsListMatch...
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); HasSameItemsAsListMatch...
@Test(expected = AssertionError.class) public void listNotEqualSortedAndNotContainsSomeItems() throws Exception { List<String> actual = asList("1", "2", "3"); List<String> expected = asList("3", "2", "1", "4"); assertThat(actual, HasSameItemsAsListMatcher.hasSameItemsAsList(expected)); }
@Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); HasSameItemsAsListMatch...
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); HasSameItemsAsListMatch...
@Test(expected = AssertionError.class) public void actualListHasLastItemTwice() throws Exception { List<String> actual = asList("1", "2", "3", "3"); List<String> expected = asList("1", "2", "3"); assertThat(actual, HasSameItemsAsListMatcher.hasSameItemsAsList(expected)); }
@Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); HasSameItemsAsListMatch...
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); HasSameItemsAsListMatch...
@Test(expected = AssertionError.class) public void actualListHasNotLastItemTwice() throws Exception { List<String> actual = asList("1", "2", "2", "3"); List<String> expected = asList("1", "2", "3"); assertThat(actual, HasSameItemsAsListMatcher.hasSameItemsAsList(expected)); }
@Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); HasSameItemsAsListMatch...
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); HasSameItemsAsListMatch...
@Test(expected = AssertionError.class) public void expectedListHasNotLastItemTwice() throws Exception { List<String> actual = asList("1", "2", "3"); List<String> expected = asList("1", "2", "2", "3"); assertThat(actual, HasSameItemsAsListMatcher.hasSameItemsAsList(expected)); }
@Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); }
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); HasSameItemsAsListMatch...
HasSameItemsAsListMatcher extends TypeSafeDiagnosingMatcher<List<? extends T>> { @Factory public static <T> HasSameItemsAsListMatcher<T> hasSameItemsAsList(List<? extends T> correctList) { return new HasSameItemsAsListMatcher<>(correctList); } HasSameItemsAsListMatcher(List<? extends T> expect); HasSameItemsAsListMatch...
@Test(expected = AssertionError.class) public void withOnlyOneCommonElement() throws Exception { List<String> actual = Arrays.asList("1", "2", "3", "4", "7"); List<String> expected = Arrays.asList("3", "4", "5"); assertThat(actual, hasSameItemsAsCollection(expected)); }
@Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
@Test(expected = AssertionError.class) public void withOnlyOneDifferElementInActual() throws Exception { List<String> actual = Arrays.asList("1", "2", "3", "4"); List<String> expected = Arrays.asList("1", "2", "3"); assertThat(actual, hasSameItemsAsCollection(expected)); }
@Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
@Test public void shouldNotContains() throws Exception { assertThat(directory, not(contains("file"))); }
@Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Mat...
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Mat...
@Test(expected = AssertionError.class) public void withOnlyOneDifferElementInExpected() throws Exception { List<String> actual = Arrays.asList("1", "2", "3"); List<String> expected = Arrays.asList("1", "2", "3", "4"); assertThat(actual, hasSameItemsAsCollection(expected)); }
@Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
@Test public void collectionsEquals() throws Exception { List<String> actual = Arrays.asList("1", "2", "3"); List<String> expected = Arrays.asList("1", "2", "3"); assertThat(actual, hasSameItemsAsCollection(expected)); }
@Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
@Test public void collectionsEqualsWithNotEqualOrder() throws Exception { List<String> actual = Arrays.asList("1", "2", "3"); List<String> expected = Arrays.asList("3", "2", "1"); assertThat(actual, hasSameItemsAsCollection(expected)); }
@Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
@Test(expected = AssertionError.class) public void collectionsNotEqualsWhenLastElTwiceInActual() throws Exception { List<String> actual = Arrays.asList("1", "2", "3", "3"); List<String> expected = Arrays.asList("1", "2", "3"); assertThat(actual, hasSameItemsAsCollection(expected)); }
@Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
@Test(expected = AssertionError.class) public void collectionsNotEqualsWhenLastElTwiceInExpected() throws Exception { List<String> actual = Arrays.asList("1", "2", "3"); List<String> expected = Arrays.asList("1", "2", "3", "3"); assertThat(actual, hasSameItemsAsCollection(expected)); }
@Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
@Test(expected = AssertionError.class) public void collectionsNotEqualsWhenNotLastElTwiceInActual() throws Exception { List<String> actual = Arrays.asList("1", "2", "2", "3"); List<String> expected = Arrays.asList("1", "2", "3"); assertThat(actual, hasSameItemsAsCollection(expected)); }
@Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
@Test(expected = AssertionError.class) public void collectionsNotEqualsWhenNotLastElTwiceInExpected() throws Exception { List<String> actual = Arrays.asList("1", "2", "3"); List<String> expected = Arrays.asList("1", "2", "2", "3"); assertThat(actual, hasSameItemsAsCollection(expected)); }
@Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } }
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
HasSameItemsAsCollectionMatcher extends TypeSafeDiagnosingMatcher<Collection<? extends T>> { @Factory public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) { return new HasSameItemsAsCollectionMatcher<>(correctList); } HasSameItemsAsCollectionMatcher(Collection...
@Test public void worksPositive() { WebDriver driver = mock(WebDriver.class); when(driver.getPageSource()).thenReturn(HTML_BODY); assertThat("Text should be found", driver, textOnCurrentPageContains(TEXT_PART)); }
@Factory public static Matcher<WebDriver> textOnCurrentPageContains(String text) { return textOnCurrentPage(CoreMatchers.containsString(text)); }
HasTextMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> textOnCurrentPageContains(String text) { return textOnCurrentPage(CoreMatchers.containsString(text)); } }
HasTextMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> textOnCurrentPageContains(String text) { return textOnCurrentPage(CoreMatchers.containsString(text)); } protected HasTextMatcher(Matcher<String> matcher); }
HasTextMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> textOnCurrentPageContains(String text) { return textOnCurrentPage(CoreMatchers.containsString(text)); } protected HasTextMatcher(Matcher<String> matcher); @Override void describeTo(Description description); @Factory static Ma...
HasTextMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> textOnCurrentPageContains(String text) { return textOnCurrentPage(CoreMatchers.containsString(text)); } protected HasTextMatcher(Matcher<String> matcher); @Override void describeTo(Description description); @Factory static Ma...
@Test public void worksNegative() { final WebDriver driver = mock(WebDriver.class); when(driver.getPageSource()).thenReturn(ANOTHER_HTML_BODY); assertThat("Should not found text", driver, not(textOnCurrentPageContains(TEXT_PART))); }
@Factory public static Matcher<WebDriver> textOnCurrentPageContains(String text) { return textOnCurrentPage(CoreMatchers.containsString(text)); }
HasTextMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> textOnCurrentPageContains(String text) { return textOnCurrentPage(CoreMatchers.containsString(text)); } }
HasTextMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> textOnCurrentPageContains(String text) { return textOnCurrentPage(CoreMatchers.containsString(text)); } protected HasTextMatcher(Matcher<String> matcher); }
HasTextMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> textOnCurrentPageContains(String text) { return textOnCurrentPage(CoreMatchers.containsString(text)); } protected HasTextMatcher(Matcher<String> matcher); @Override void describeTo(Description description); @Factory static Ma...
HasTextMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> textOnCurrentPageContains(String text) { return textOnCurrentPage(CoreMatchers.containsString(text)); } protected HasTextMatcher(Matcher<String> matcher); @Override void describeTo(Description description); @Factory static Ma...
@Test public void worksPositive() { WebDriver driver = mock(WebDriver.class); WebElement element = mock(WebElement.class); when(driver.findElement(XPATH_EXISTS)).thenReturn(element); assertThat("Element should be found", driver, canFindElement(XPATH_EXISTS)); }
@Factory public static Matcher<WebDriver> canFindElement(By by) { return new CanFindElementMatcher(by); }
CanFindElementMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> canFindElement(By by) { return new CanFindElementMatcher(by); } }
CanFindElementMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> canFindElement(By by) { return new CanFindElementMatcher(by); } protected CanFindElementMatcher(By by); }
CanFindElementMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> canFindElement(By by) { return new CanFindElementMatcher(by); } protected CanFindElementMatcher(By by); @Override void describeTo(Description description); @Factory static Matcher<WebDriver> canFindElement(By by); }
CanFindElementMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> canFindElement(By by) { return new CanFindElementMatcher(by); } protected CanFindElementMatcher(By by); @Override void describeTo(Description description); @Factory static Matcher<WebDriver> canFindElement(By by); }
@Test public void shouldIsDirectory() throws Exception { assertThat(directory, isDirectory()); }
@Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); }
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } }
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Path> hasFilesCount(i...
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Path> hasFilesCount(i...
@Test public void worksNegative() { WebDriver driver = mock(WebDriver.class); when(driver.findElement(XPATH_NOT_EXISTS)).thenThrow(new NoSuchElementException("")); assertThat("Element should not be found", driver, not(canFindElement(XPATH_NOT_EXISTS))); }
@Factory public static Matcher<WebDriver> canFindElement(By by) { return new CanFindElementMatcher(by); }
CanFindElementMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> canFindElement(By by) { return new CanFindElementMatcher(by); } }
CanFindElementMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> canFindElement(By by) { return new CanFindElementMatcher(by); } protected CanFindElementMatcher(By by); }
CanFindElementMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> canFindElement(By by) { return new CanFindElementMatcher(by); } protected CanFindElementMatcher(By by); @Override void describeTo(Description description); @Factory static Matcher<WebDriver> canFindElement(By by); }
CanFindElementMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> canFindElement(By by) { return new CanFindElementMatcher(by); } protected CanFindElementMatcher(By by); @Override void describeTo(Description description); @Factory static Matcher<WebDriver> canFindElement(By by); }
@Test public void shouldFindExistingCookie() { WebDriver driver = mock(WebDriver.class); Options options = mock(Options.class); Cookie cookie = new Cookie(cookieName, "oki-doki"); when(driver.manage()).thenReturn(options); when(options.getCookieNamed(eq(cookieName))).thenReturn(cookie); assertThat("Cookie not found!", ...
@Factory public static Matcher<WebDriver> hasCookie(String name) { return new HasCookieMatcher(name); }
HasCookieMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> hasCookie(String name) { return new HasCookieMatcher(name); } }
HasCookieMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> hasCookie(String name) { return new HasCookieMatcher(name); } protected HasCookieMatcher(String name); }
HasCookieMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> hasCookie(String name) { return new HasCookieMatcher(name); } protected HasCookieMatcher(String name); @Override void describeTo(Description description); @Factory static Matcher<WebDriver> hasCookie(String name); }
HasCookieMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> hasCookie(String name) { return new HasCookieMatcher(name); } protected HasCookieMatcher(String name); @Override void describeTo(Description description); @Factory static Matcher<WebDriver> hasCookie(String name); }
@Test public void shouldNotFindUnexistingCookie() { final WebDriver driver = mock(WebDriver.class); Options options = mock(Options.class); when(driver.manage()).thenReturn(options); when(options.getCookieNamed(eq(cookieName))).thenReturn(null); assertThat("Cook should not be found", driver, not(hasCookie(cookieName)));...
@Factory public static Matcher<WebDriver> hasCookie(String name) { return new HasCookieMatcher(name); }
HasCookieMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> hasCookie(String name) { return new HasCookieMatcher(name); } }
HasCookieMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> hasCookie(String name) { return new HasCookieMatcher(name); } protected HasCookieMatcher(String name); }
HasCookieMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> hasCookie(String name) { return new HasCookieMatcher(name); } protected HasCookieMatcher(String name); @Override void describeTo(Description description); @Factory static Matcher<WebDriver> hasCookie(String name); }
HasCookieMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> hasCookie(String name) { return new HasCookieMatcher(name); } protected HasCookieMatcher(String name); @Override void describeTo(Description description); @Factory static Matcher<WebDriver> hasCookie(String name); }
@Test(expected = AssertionError.class) public void shouldFailIfNotADirectory() throws Exception { assertThat(directory.resolve("file"), isDirectory()); }
@Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); }
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } }
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Path> hasFilesCount(i...
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Path> hasFilesCount(i...
@Test public void shouldNotIsDirectory() throws Exception { Path file = directory.resolve("file"); Files.write(file, "content".getBytes(StandardCharsets.UTF_8)); assertThat(file, not(isDirectory())); }
@Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); }
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } }
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Path> hasFilesCount(i...
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Path> hasFilesCount(i...
@Test public void shouldNotFailIfFileDoesNotExists() throws Exception { Path file = directory.resolve("file"); assertThat(file, not(isDirectory())); }
@Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); }
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } }
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Path> hasFilesCount(i...
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Path> hasFilesCount(i...
@Test public void shouldExists() throws Exception { Path file = directory.resolve("file"); Files.write(file, "content".getBytes(StandardCharsets.UTF_8)); assertThat(file, exists()); }
@Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Pat...
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Pat...
@Test(expected = AssertionError.class) public void shouldFailIfNotExists() throws Exception { assertThat(directory.resolve("file"), exists()); }
@Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Pat...
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Pat...
@Test public void shouldNotExists() throws Exception { Path file = directory.resolve("file"); assertThat(file, not(exists())); }
@Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Pat...
PathMatchers { @Factory public static Matcher<Path> exists(LinkOption... options) { return new Exists(options); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Pat...
@Test public void testTelemetryInstanceCreationSuccess() { Telemetry telemetry = Telemetry.getInstance(); Assert.assertNotNull(telemetry); }
public synchronized static Telemetry getInstance() { if (sTelemetryInstance == null) { new Builder().build(); } return sTelemetryInstance; }
Telemetry { public synchronized static Telemetry getInstance() { if (sTelemetryInstance == null) { new Builder().build(); } return sTelemetryInstance; } }
Telemetry { public synchronized static Telemetry getInstance() { if (sTelemetryInstance == null) { new Builder().build(); } return sTelemetryInstance; } private Telemetry(final Builder builder); }
Telemetry { public synchronized static Telemetry getInstance() { if (sTelemetryInstance == null) { new Builder().build(); } return sTelemetryInstance; } private Telemetry(final Builder builder); synchronized static Telemetry getInstance(); void addObserver(@SuppressWarnings(WarningType.rawtype_warning) final ITelemetr...
Telemetry { public synchronized static Telemetry getInstance() { if (sTelemetryInstance == null) { new Builder().build(); } return sTelemetryInstance; } private Telemetry(final Builder builder); synchronized static Telemetry getInstance(); void addObserver(@SuppressWarnings(WarningType.rawtype_warning) final ITelemetr...
@Test public void load() throws Exception { List<Variable> list = new ArrayList<>(); list.add(new Variable("probe")); list.add(new Variable("mode")); list.add(new Variable("should-have-default", "should have default value", "default")); ConfigurationLoader config = new ConfigurationLoader(list); Map<String, Object> res...
public Map<String, Object> loadConfiguration(File file) throws IOException { Map<String, Object> config = new HashMap<>(defaultConfig); Map<String, Object> tmpConfig; try (InputStream input = new FileInputStream(file)) { Yaml yaml = new Yaml(); tmpConfig = yaml.load(input); if (tmpConfig == null) { return config; } for...
ConfigurationLoader { public Map<String, Object> loadConfiguration(File file) throws IOException { Map<String, Object> config = new HashMap<>(defaultConfig); Map<String, Object> tmpConfig; try (InputStream input = new FileInputStream(file)) { Yaml yaml = new Yaml(); tmpConfig = yaml.load(input); if (tmpConfig == null) ...
ConfigurationLoader { public Map<String, Object> loadConfiguration(File file) throws IOException { Map<String, Object> config = new HashMap<>(defaultConfig); Map<String, Object> tmpConfig; try (InputStream input = new FileInputStream(file)) { Yaml yaml = new Yaml(); tmpConfig = yaml.load(input); if (tmpConfig == null) ...
ConfigurationLoader { public Map<String, Object> loadConfiguration(File file) throws IOException { Map<String, Object> config = new HashMap<>(defaultConfig); Map<String, Object> tmpConfig; try (InputStream input = new FileInputStream(file)) { Yaml yaml = new Yaml(); tmpConfig = yaml.load(input); if (tmpConfig == null) ...
ConfigurationLoader { public Map<String, Object> loadConfiguration(File file) throws IOException { Map<String, Object> config = new HashMap<>(defaultConfig); Map<String, Object> tmpConfig; try (InputStream input = new FileInputStream(file)) { Yaml yaml = new Yaml(); tmpConfig = yaml.load(input); if (tmpConfig == null) ...
@Test public void check_deep_optional_optional_data_type_of_deep_optional() throws Exception { assertFalse(Optionality.is_optional_of(m_oodt, m_oodt)); }
public static boolean is_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; return (odt.inner_type() == inner); }
Optionality { public static boolean is_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; return (odt.inner_type() == inner); } }
Optionality { public static boolean is_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; return (odt.inner_type() == inner); } private Optionality(); }
Optionality { public static boolean is_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; return (odt.inner_type() == inner); } private Optionality(); static boolean is_option...
Optionality { public static boolean is_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; return (odt.inner_type() == inner); } private Optionality(); static boolean is_option...
@Test public void check_non_optional_deep_optional_data_type_of_non_optional() throws Exception { assertFalse(Optionality.is_deep_optional_of(m_dt, m_dt)); }
public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.inner_type(), in...
Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in...
Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in...
Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in...
Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in...
@Test public void check_non_optional_deep_optional_data_type_of_optional() throws Exception { assertTrue(Optionality.is_deep_optional_of(m_odt, m_dt)); }
public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.inner_type(), in...
Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in...
Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in...
Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in...
Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_optional_of(odt.in...