xref: /aosp_15_r20/external/replicaisland/src/com/replica/replicaisland/PhasedObject.java (revision 5eae8ebb3c5756e41e77a1f7201fcf94b0eade1f)
1*5eae8ebbSCole Faust /*
2*5eae8ebbSCole Faust  * Copyright (C) 2010 The Android Open Source Project
3*5eae8ebbSCole Faust  *
4*5eae8ebbSCole Faust  * Licensed under the Apache License, Version 2.0 (the "License");
5*5eae8ebbSCole Faust  * you may not use this file except in compliance with the License.
6*5eae8ebbSCole Faust  * You may obtain a copy of the License at
7*5eae8ebbSCole Faust  *
8*5eae8ebbSCole Faust  *      http://www.apache.org/licenses/LICENSE-2.0
9*5eae8ebbSCole Faust  *
10*5eae8ebbSCole Faust  * Unless required by applicable law or agreed to in writing, software
11*5eae8ebbSCole Faust  * distributed under the License is distributed on an "AS IS" BASIS,
12*5eae8ebbSCole Faust  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*5eae8ebbSCole Faust  * See the License for the specific language governing permissions and
14*5eae8ebbSCole Faust  * limitations under the License.
15*5eae8ebbSCole Faust  */
16*5eae8ebbSCole Faust 
17*5eae8ebbSCole Faust package com.replica.replicaisland;
18*5eae8ebbSCole Faust 
19*5eae8ebbSCole Faust /**
20*5eae8ebbSCole Faust  * A basic object that adds an execution phase.  When PhasedObjects are combined with
21*5eae8ebbSCole Faust  * PhasedObjectManagers, objects within the manager will be updated by phase.
22*5eae8ebbSCole Faust  */
23*5eae8ebbSCole Faust public class PhasedObject extends BaseObject {
24*5eae8ebbSCole Faust 
25*5eae8ebbSCole Faust     public int phase;   // This is public because the phased is accessed extremely often, so much
26*5eae8ebbSCole Faust                         // so that the function overhead of an getter is non-trivial.
27*5eae8ebbSCole Faust 
PhasedObject()28*5eae8ebbSCole Faust     public PhasedObject() {
29*5eae8ebbSCole Faust         super();
30*5eae8ebbSCole Faust     }
31*5eae8ebbSCole Faust 
32*5eae8ebbSCole Faust     @Override
reset()33*5eae8ebbSCole Faust     public void reset() {
34*5eae8ebbSCole Faust 
35*5eae8ebbSCole Faust     }
36*5eae8ebbSCole Faust 
setPhase(int phaseValue)37*5eae8ebbSCole Faust     public void setPhase(int phaseValue) {
38*5eae8ebbSCole Faust         phase = phaseValue;
39*5eae8ebbSCole Faust     }
40*5eae8ebbSCole Faust }
41