Created
December 26, 2014 08:41
-
-
Save ttoommbb/ae0487462330198eb2ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.zhangbog.dexcounttest; | |
public class AnotherTypedEvent implements ITypedEvent<AnotherTypedEvent.EventType> | |
{ | |
private final EventType eventType; | |
static enum EventType | |
{ | |
CC, DD | |
} | |
public AnotherTypedEvent(EventType eventType) | |
{ | |
this.eventType = eventType; | |
} | |
@Override | |
public EventType getType() | |
{ | |
return this.eventType; | |
} | |
@Override | |
public boolean isBlocking() | |
{ | |
return false; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.zhangbog.dexcounttest; | |
public interface IEvent | |
{ | |
boolean isBlocking(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.zhangbog.dexcounttest; | |
public interface ITypedEvent<T extends Enum> extends IEvent | |
{ | |
T getType(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.zhangbog.dexcounttest; | |
public class SomeTypedEvent implements ITypedEvent<SomeTypedEvent.EventType> | |
{ | |
private final EventType eventType; | |
static enum EventType{AA,BB} | |
public SomeTypedEvent(EventType eventType) | |
{ | |
this.eventType = eventType; | |
} | |
@Override | |
public EventType getType() | |
{ | |
return this.eventType; | |
} | |
@Override | |
public boolean isBlocking() | |
{ | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment