Skip to content

Commit

Permalink
Add some syntatic sugar
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantomYdn committed Apr 16, 2022
1 parent 726c5d9 commit f92943f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@ public static interface ITransponderEntity extends ITransponderHolder{

}

public static interface ITransponderDelegator extends ITransponderHolder{
public static interface ITransponderDelegator<T> extends ITransponderHolder{
//CHECKSTYLE IGNORE MethodName FOR NEXT 8 LINES
/**
* @return associated delegate instance
*/
public Object get$delegate();
public T get$delegate();
/**
* @param delegate delegate to associate instance with
*/
public void set$delegate(Object delegate);
public void set$delegate(T delegate);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,11 @@ public void testDelegation() {
assertEquals("OVERRIDED", delegator.toString());
}

public static interface OvverideSize {
public static interface OvverideSize extends ITransponderDelegator<Map<Object, Object>> {

@OverrideByThis
default int size() {
return -((Map<String, String>)((ITransponderDelegator)this).get$delegate()).size();
return -get$delegate().size();
}

@OverrideByThis
Expand Down

0 comments on commit f92943f

Please sign in to comment.